[oe-commits] [openembedded-core] 28/116: uninative: use check_output instead of Popen directly
git at git.openembedded.org
git at git.openembedded.org
Sun Feb 28 11:29:14 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit e689e52ff24d8b4dd4c3cf657d02a8a521913585
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Feb 23 21:10:13 2016 +0000
uninative: use check_output instead of Popen directly
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/uninative.bbclass | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 7e225e6..270c1b0 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -83,12 +83,10 @@ python uninative_changeinterp () {
except oe.qa.NotELFFileError:
continue
- #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
- cmd = "patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f)
- p = subprocess.Popen(cmd, shell=True,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- stdout, stderr = p.communicate()
- if p.returncode:
+ try:
+ subprocess.check_output(("patchelf-uninative", "--set-interpreter",
+ d.getVar("UNINATIVE_LOADER", True), f))
+ except subprocess.CalledProcessError as e:
bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
- (cmd, p.returncode, stdout))
+ (e.cmd, e.returncode, e.output))
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list