From db43e59f41b6bc19152cd4743585a3217015e272 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 29 Jun 2015 18:01:42 +0300 Subject: wic: Code cleanup: long lines, identation and whitespaces Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. Signed-off-by: Ed Bartosh --- scripts/lib/wic/msger.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'scripts/lib/wic/msger.py') diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py index 35b705b867..1b60980296 100644 --- a/scripts/lib/wic/msger.py +++ b/scripts/lib/wic/msger.py @@ -16,7 +16,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. -import os,sys +import os +import sys import re import time @@ -37,8 +38,8 @@ __ALL__ = ['set_mode', # COLORs in ANSI INFO_COLOR = 32 # green WARN_COLOR = 33 # yellow -ERR_COLOR = 31 # red -ASK_COLOR = 34 # blue +ERR_COLOR = 31 # red +ASK_COLOR = 34 # blue NO_COLOR = 0 PREFIX_RE = re.compile('^<(.*?)>\s*(.*)', re.S) @@ -47,12 +48,12 @@ INTERACTIVE = True LOG_LEVEL = 1 LOG_LEVELS = { - 'quiet': 0, - 'normal': 1, - 'verbose': 2, - 'debug': 3, - 'never': 4, - } + 'quiet': 0, + 'normal': 1, + 'verbose': 2, + 'debug': 3, + 'never': 4, +} LOG_FILE_FP = None LOG_CONTENT = '' @@ -75,7 +76,7 @@ def _general_print(head, color, msg=None, stream=None, level='normal'): errormsg = '' if CATCHERR_BUFFILE_FD > 0: - size = os.lseek(CATCHERR_BUFFILE_FD , 0, os.SEEK_END) + size = os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_END) os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_SET) errormsg = os.read(CATCHERR_BUFFILE_FD, size) os.ftruncate(CATCHERR_BUFFILE_FD, 0) @@ -158,7 +159,7 @@ def _split_msg(head, msg): return head, msg def get_loglevel(): - return (k for k,v in LOG_LEVELS.items() if v==LOG_LEVEL).next() + return (k for k, v in LOG_LEVELS.items() if v == LOG_LEVEL).next() def set_loglevel(level): global LOG_LEVEL -- cgit v1.2.3