aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/msger.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-02 13:58:16 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-02 23:46:52 +0100
commit872cb0d5d79b26f34e6b35d7be8870d245021be4 (patch)
tree37cc334e9769e40e1df60e777e934ee7a404282f /scripts/lib/wic/msger.py
parentaf0a6d547a5a3efefdd4900f7079dfd10b85342d (diff)
downloadopenembedded-core-contrib-872cb0d5d79b26f34e6b35d7be8870d245021be4.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". 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.py13
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):
msg = msg.lstrip()
head = '\r' + head
- m = PREFIX_RE.match(msg)
- if m:
- head += ' <%s>' % m.group(1)
- msg = m.group(2)
+ match = PREFIX_RE.match(msg)
+ if match:
+ head += ' <%s>' % match.group(1)
+ msg = match.group(2)
return head, msg
@@ -271,9 +271,8 @@ def set_logfile(fpath):
def _savelogf():
if LOG_FILE_FP:
- fp = open(LOG_FILE_FP, 'w')
- fp.write(LOG_CONTENT)
- fp.close()
+ with open(LOG_FILE_FP, 'w') as log:
+ log.write(LOG_CONTENT)
if LOG_FILE_FP is not None:
warning('duplicate log file configuration')