diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-09-02 13:58:16 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-03 12:43:31 +0100 |
commit | 791a3912d98014105bdb2a8585e4a1b7ae8120b1 (patch) | |
tree | bcfb06b795482f6113cfa6b5c967a0bbb9b4bc1c /scripts/lib/wic/msger.py | |
parent | 14b47e22f9b2566320ab6ef103da1501bca129de (diff) | |
download | poky-791a3912d98014105bdb2a8585e4a1b7ae8120b1.tar.gz |
wic: fix short variable names
Made short variable names longer and more readable.
Fixed pylint warnings "Invalid variable name" and
"Invalid argument name".
(From OE-Core rev: 872cb0d5d79b26f34e6b35d7be8870d245021be4)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/msger.py')
-rw-r--r-- | scripts/lib/wic/msger.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py index 1b60980296..b737554228 100644 --- a/scripts/lib/wic/msger.py +++ b/scripts/lib/wic/msger.py | |||
@@ -151,10 +151,10 @@ def _split_msg(head, msg): | |||
151 | msg = msg.lstrip() | 151 | msg = msg.lstrip() |
152 | head = '\r' + head | 152 | head = '\r' + head |
153 | 153 | ||
154 | m = PREFIX_RE.match(msg) | 154 | match = PREFIX_RE.match(msg) |
155 | if m: | 155 | if match: |
156 | head += ' <%s>' % m.group(1) | 156 | head += ' <%s>' % match.group(1) |
157 | msg = m.group(2) | 157 | msg = match.group(2) |
158 | 158 | ||
159 | return head, msg | 159 | return head, msg |
160 | 160 | ||
@@ -271,9 +271,8 @@ def set_logfile(fpath): | |||
271 | 271 | ||
272 | def _savelogf(): | 272 | def _savelogf(): |
273 | if LOG_FILE_FP: | 273 | if LOG_FILE_FP: |
274 | fp = open(LOG_FILE_FP, 'w') | 274 | with open(LOG_FILE_FP, 'w') as log: |
275 | fp.write(LOG_CONTENT) | 275 | log.write(LOG_CONTENT) |
276 | fp.close() | ||
277 | 276 | ||
278 | if LOG_FILE_FP is not None: | 277 | if LOG_FILE_FP is not None: |
279 | warning('duplicate log file configuration') | 278 | warning('duplicate log file configuration') |