summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-08-22 16:36:53 +0800
committerRobert Yang <liezhi.yang@windriver.com>2018-08-23 16:05:41 +0800
commit39ef539345dd647979c04b7e461e0d07b9634e85 (patch)
treec132301b91c278572476c378ae1cbb4213f92912
parentb297f5062ff4e7f17b0152fd6e736cae35861b28 (diff)
downloadopenembedded-core-contrib-39ef539345dd647979c04b7e461e0d07b9634e85.tar.gz
openembedded-core-contrib-39ef539345dd647979c04b7e461e0d07b9634e85.tar.bz2
openembedded-core-contrib-39ef539345dd647979c04b7e461e0d07b9634e85.zip
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). Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-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):
def runcmd(args, dir = None):
import pipes
+ import subprocess
if dir:
olddir = os.path.abspath(os.curdir)
@@ -33,7 +34,7 @@ def runcmd(args, dir = None):
args = [ pipes.quote(str(arg)) for arg in args ]
cmd = " ".join(args)
# print("cmd: %s" % cmd)
- (exitstatus, output) = oe.utils.getstatusoutput(cmd)
+ (exitstatus, output) = subprocess.getstatusoutput(cmd)
if exitstatus != 0:
raise CmdError(cmd, exitstatus >> 8, output)
if " fuzz " in output: