summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-02-23 21:10:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-28 11:32:35 +0000
commit938687db0255d749ed8110d68628e505967b7131 (patch)
tree96aedb57b8307a52eaf6d4af2d759f6c54b28f02 /meta
parent4c1fe0cbcb98b0a69ad5b3a04432055d773ee4ba (diff)
downloadopenembedded-core-938687db0255d749ed8110d68628e505967b7131.tar.gz
openembedded-core-938687db0255d749ed8110d68628e505967b7131.tar.bz2
openembedded-core-938687db0255d749ed8110d68628e505967b7131.zip
uninative: use check_output instead of Popen directly
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/uninative.bbclass12
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 7e225e6f15..270c1b0be4 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))
}