From 872cb0d5d79b26f34e6b35d7be8870d245021be4 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 2 Sep 2015 13:58:16 +0300 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/wic/msger.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'scripts/lib/wic/msger.py') 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') -- cgit v1.2.3