diff options
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r-- | meta/lib/oe/patch.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 7cd8436da5..feb6ee7082 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py | |||
@@ -2,6 +2,9 @@ | |||
2 | # SPDX-License-Identifier: GPL-2.0-only | 2 | # SPDX-License-Identifier: GPL-2.0-only |
3 | # | 3 | # |
4 | 4 | ||
5 | import os | ||
6 | import shlex | ||
7 | import subprocess | ||
5 | import oe.path | 8 | import oe.path |
6 | import oe.types | 9 | import oe.types |
7 | 10 | ||
@@ -24,7 +27,6 @@ class CmdError(bb.BBHandledException): | |||
24 | 27 | ||
25 | 28 | ||
26 | def runcmd(args, dir = None): | 29 | def runcmd(args, dir = None): |
27 | import pipes | ||
28 | import subprocess | 30 | import subprocess |
29 | 31 | ||
30 | if dir: | 32 | if dir: |
@@ -35,7 +37,7 @@ def runcmd(args, dir = None): | |||
35 | # print("cwd: %s -> %s" % (olddir, dir)) | 37 | # print("cwd: %s -> %s" % (olddir, dir)) |
36 | 38 | ||
37 | try: | 39 | try: |
38 | args = [ pipes.quote(str(arg)) for arg in args ] | 40 | args = [ shlex.quote(str(arg)) for arg in args ] |
39 | cmd = " ".join(args) | 41 | cmd = " ".join(args) |
40 | # print("cmd: %s" % cmd) | 42 | # print("cmd: %s" % cmd) |
41 | (exitstatus, output) = subprocess.getstatusoutput(cmd) | 43 | (exitstatus, output) = subprocess.getstatusoutput(cmd) |