From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: yocto@yoctoproject.org
Subject: [layerindex-web][PATCH 2/4] utils: fix error in runcmd() if printerr=False
Date: Wed, 16 Nov 2016 16:18:32 +1300 [thread overview]
Message-ID: <1479266314-8574-2-git-send-email-paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <1479266314-8574-1-git-send-email-paul.eggleton@linux.intel.com>
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
93ce26f21cdbbd8a645792359cde87acf05144d7.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
layerindex/utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layerindex/utils.py b/layerindex/utils.py
index e3be631..9248077 100644
--- a/layerindex/utils.py
+++ b/layerindex/utils.py
@@ -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:
--
2.5.5
next prev parent reply other threads:[~2016-11-16 3:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 3:18 [layerindex-web][PATCH 1/4] admin: add an action to duplicate a branch Paul Eggleton
2016-11-16 3:18 ` Paul Eggleton [this message]
2016-11-16 3:18 ` [layerindex-web][PATCH 3/4] Record and display update logs Paul Eggleton
2016-11-16 3:18 ` [layerindex-web][PATCH 4/4] views: support querying class inheritance Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479266314-8574-2-git-send-email-paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.