diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-08-18 18:41:33 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-30 12:36:08 +0100 |
commit | b41de121c66920a86af29fa0e7e98013b388863e (patch) | |
tree | b2f32cb007d4097117f9fd5d222b807637919f1a /scripts/lib/wic/utils | |
parent | e79a22e4560cac0ce78a1ec04d7f799421e2b80f (diff) | |
download | poky-b41de121c66920a86af29fa0e7e98013b388863e.tar.gz |
wic: remove undescore from function name
Renamed __exec_cmd -> _exec_cmd as double underscores cause
strange behaviour when function is called in class method.
Python complains that __exec_cmd method(!!!) of the same class
doesn't exist.
(From OE-Core rev: 3b400a06d755e3d437967f60842b1d9bd94f0814)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/utils')
-rw-r--r-- | scripts/lib/wic/utils/oe/misc.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils/oe/misc.py index d399f2a480..9c8f52dd0d 100644 --- a/scripts/lib/wic/utils/oe/misc.py +++ b/scripts/lib/wic/utils/oe/misc.py | |||
@@ -46,13 +46,13 @@ NATIVE_RECIPES = {"mcopy": "mtools", | |||
46 | "syslinux": "syslinux" | 46 | "syslinux": "syslinux" |
47 | } | 47 | } |
48 | 48 | ||
49 | def __exec_cmd(cmd_and_args, as_shell=False, catch=3): | 49 | def _exec_cmd(cmd_and_args, as_shell=False, catch=3): |
50 | """ | 50 | """ |
51 | Execute command, catching stderr, stdout | 51 | Execute command, catching stderr, stdout |
52 | 52 | ||
53 | Need to execute as_shell if the command uses wildcards | 53 | Need to execute as_shell if the command uses wildcards |
54 | """ | 54 | """ |
55 | msger.debug("__exec_cmd: %s" % cmd_and_args) | 55 | msger.debug("_exec_cmd: %s" % cmd_and_args) |
56 | args = cmd_and_args.split() | 56 | args = cmd_and_args.split() |
57 | msger.debug(args) | 57 | msger.debug(args) |
58 | 58 | ||
@@ -61,7 +61,7 @@ def __exec_cmd(cmd_and_args, as_shell=False, catch=3): | |||
61 | else: | 61 | else: |
62 | ret, out = runner.runtool(args, catch) | 62 | ret, out = runner.runtool(args, catch) |
63 | out = out.strip() | 63 | out = out.strip() |
64 | msger.debug("__exec_cmd: output for %s (rc = %d): %s" % \ | 64 | msger.debug("_exec_cmd: output for %s (rc = %d): %s" % \ |
65 | (cmd_and_args, ret, out)) | 65 | (cmd_and_args, ret, out)) |
66 | 66 | ||
67 | return (ret, out) | 67 | return (ret, out) |
@@ -73,7 +73,7 @@ def exec_cmd(cmd_and_args, as_shell=False, catch=3): | |||
73 | 73 | ||
74 | Exits if rc non-zero | 74 | Exits if rc non-zero |
75 | """ | 75 | """ |
76 | ret, out = __exec_cmd(cmd_and_args, as_shell, catch) | 76 | ret, out = _exec_cmd(cmd_and_args, as_shell, catch) |
77 | 77 | ||
78 | if ret != 0: | 78 | if ret != 0: |
79 | msger.error("exec_cmd: %s returned '%s' instead of 0" % \ | 79 | msger.error("exec_cmd: %s returned '%s' instead of 0" % \ |
@@ -99,7 +99,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3): | |||
99 | args = cmd_and_args.split() | 99 | args = cmd_and_args.split() |
100 | msger.debug(args) | 100 | msger.debug(args) |
101 | 101 | ||
102 | ret, out = __exec_cmd(native_cmd_and_args, True, catch) | 102 | ret, out = _exec_cmd(native_cmd_and_args, True, catch) |
103 | 103 | ||
104 | if ret == 127: # shell command-not-found | 104 | if ret == 127: # shell command-not-found |
105 | prog = args[0] | 105 | prog = args[0] |
@@ -139,7 +139,7 @@ def get_bitbake_var(var, image=None): | |||
139 | 139 | ||
140 | log_level = msger.get_loglevel() | 140 | log_level = msger.get_loglevel() |
141 | msger.set_loglevel('normal') | 141 | msger.set_loglevel('normal') |
142 | ret, lines = __exec_cmd(cmd) | 142 | ret, lines = _exec_cmd(cmd) |
143 | msger.set_loglevel(log_level) | 143 | msger.set_loglevel(log_level) |
144 | 144 | ||
145 | if ret: | 145 | if ret: |