summaryrefslogtreecommitdiffstats
path: root/meta/lib
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:19 +0100
commitc3e7739987d804f7865428442479d5bece5ff2dd (patch)
tree948521210389406d7688186b467fa2e6d498cf23 /meta/lib
parent90c730a898f11adb2ecd377cdd913af83123bcb7 (diff)
downloadopenembedded-core-contrib-c3e7739987d804f7865428442479d5bece5ff2dd.tar.gz
openembedded-core-contrib-c3e7739987d804f7865428442479d5bece5ff2dd.tar.bz2
openembedded-core-contrib-c3e7739987d804f7865428442479d5bece5ff2dd.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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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: