Show logs inside 'Running scripts' in mic.
authorxiaojuan.mao <xiaojuan.mao@samsung.com>
Tue, 14 Mar 2017 02:13:13 +0000 (10:13 +0800)
committerxiaojuan.mao <xiaojuan.mao@samsung.com>
Tue, 14 Mar 2017 02:14:04 +0000 (10:14 +0800)
Change-Id: I6be708a8c791911d96d903063401a156bc23c138

mic/imager/baseimager.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 51ca9f7..5982dcc
@@ -1164,8 +1164,8 @@ class BaseImageCreator(object):
                                        env = env,
                                        stdout = subprocess.PIPE,
                                        stderr = subprocess.STDOUT)
-                    for entry in p.communicate()[0].splitlines():
-                        msger.info(entry)
+                    while p.poll() == None:
+                       msger.info(p.stdout.readline().strip())
                 except OSError, (err, msg):
                     raise CreatorError("Failed to execute %%post script "
                                        "with '%s' : %s" % (s.interp, msg))