summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-08-23 16:07:25 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-23 18:02:23 +0100
commit37b1ed066dfdb09be6f0abef6907a838f373686c (patch)
tree2ffc1e3e45c9de11b13882ac3d31addceb2ccf2e /meta/lib/oe
parent7cb2ece8b59658168cb35b78447fa5a7085470c2 (diff)
downloadpoky-37b1ed066dfdb09be6f0abef6907a838f373686c.tar.gz
lib/oe/patch.py: Clean up getstatusoutput usage
We can't use subprocess.check_output() or subprocess.call() here since the one who invokes runcmd() needs handle CmdError() exception (error out or ignore it). (From OE-Core rev: c3e7739987d804f7865428442479d5bece5ff2dd) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/patch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index af7aa52351..e0f0604251 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -21,6 +21,7 @@ class CmdError(bb.BBHandledException):
21 21
22def runcmd(args, dir = None): 22def runcmd(args, dir = None):
23 import pipes 23 import pipes
24 import subprocess
24 25
25 if dir: 26 if dir:
26 olddir = os.path.abspath(os.curdir) 27 olddir = os.path.abspath(os.curdir)
@@ -33,7 +34,7 @@ def runcmd(args, dir = None):
33 args = [ pipes.quote(str(arg)) for arg in args ] 34 args = [ pipes.quote(str(arg)) for arg in args ]
34 cmd = " ".join(args) 35 cmd = " ".join(args)
35 # print("cmd: %s" % cmd) 36 # print("cmd: %s" % cmd)
36 (exitstatus, output) = oe.utils.getstatusoutput(cmd) 37 (exitstatus, output) = subprocess.getstatusoutput(cmd)
37 if exitstatus != 0: 38 if exitstatus != 0:
38 raise CmdError(cmd, exitstatus >> 8, output) 39 raise CmdError(cmd, exitstatus >> 8, output)
39 if " fuzz " in output: 40 if " fuzz " in output: