[oe-commits] [openembedded-core] 08/21: lib/oe/patch.py: Clean up getstatusoutput usage

git at git.openembedded.org git at git.openembedded.org
Thu Aug 23 08:13:38 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 1da7b2886398659cdca10d9d0551b402263b7127
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Thu Aug 23 16:07:25 2018 +0800

    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 at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/patch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index af7aa52..e0f0604 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list