summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/utils/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/utils/runner.py')
-rw-r--r--scripts/lib/wic/utils/runner.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py
index f6a1d0828c..7431917ff0 100644
--- a/scripts/lib/wic/utils/runner.py
+++ b/scripts/lib/wic/utils/runner.py
@@ -62,13 +62,13 @@ def runtool(cmdln_or_args, catch=1):
62 serr = subprocess.STDOUT 62 serr = subprocess.STDOUT
63 63
64 try: 64 try:
65 p = subprocess.Popen(cmdln_or_args, stdout=sout, 65 process = subprocess.Popen(cmdln_or_args, stdout=sout,
66 stderr=serr, shell=shell) 66 stderr=serr, shell=shell)
67 (sout, serr) = p.communicate() 67 (sout, serr) = process.communicate()
68 # combine stdout and stderr, filter None out 68 # combine stdout and stderr, filter None out
69 out = ''.join(filter(None, [sout, serr])) 69 out = ''.join(filter(None, [sout, serr]))
70 except OSError, e: 70 except OSError, err:
71 if e.errno == 2: 71 if err.errno == 2:
72 # [Errno 2] No such file or directory 72 # [Errno 2] No such file or directory
73 msger.error('Cannot run command: %s, lost dependency?' % cmd) 73 msger.error('Cannot run command: %s, lost dependency?' % cmd)
74 else: 74 else:
@@ -77,12 +77,12 @@ def runtool(cmdln_or_args, catch=1):
77 if catch != 3: 77 if catch != 3:
78 os.close(dev_null) 78 os.close(dev_null)
79 79
80 return (p.returncode, out) 80 return (process.returncode, out)
81 81
82def show(cmdln_or_args): 82def show(cmdln_or_args):
83 # show all the message using msger.verbose 83 # show all the message using msger.verbose
84 84
85 rc, out = runtool(cmdln_or_args, catch=3) 85 rcode, out = runtool(cmdln_or_args, catch=3)
86 86
87 if isinstance(cmdln_or_args, list): 87 if isinstance(cmdln_or_args, list):
88 cmd = ' '.join(cmdln_or_args) 88 cmd = ' '.join(cmdln_or_args)
@@ -100,7 +100,7 @@ def show(cmdln_or_args):
100 msg += '\n +----------------' 100 msg += '\n +----------------'
101 101
102 msger.verbose(msg) 102 msger.verbose(msg)
103 return rc 103 return rcode
104 104
105def outs(cmdln_or_args, catch=1): 105def outs(cmdln_or_args, catch=1):
106 # get the outputs of tools 106 # get the outputs of tools