mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
utils: fix error in runcmd() if printerr=False
If you specified printerr=False we were referring to the output variable
that hadn't been set. Looks like I broke this back in 2013 in
93ce26f21c
.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
002b7c1782
commit
cc1d82f893
|
@ -190,9 +190,9 @@ def runcmd(cmd, destdir=None, printerr=True, logger=None):
|
|||
subprocess.check_call(cmd, stdout=out, stderr=out, cwd=destdir, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
out.seek(0)
|
||||
output = out.read()
|
||||
output = output.decode('ascii').strip()
|
||||
if printerr:
|
||||
output = out.read()
|
||||
output = output.decode('ascii').strip()
|
||||
if logger:
|
||||
logger.error("%s" % output)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user