From c3e7739987d804f7865428442479d5bece5ff2dd Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Thu, 23 Aug 2018 16:07:25 +0800 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oe/patch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta/lib') 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: -- cgit 1.2.3-korg