diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-29 18:01:42 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-02 23:01:49 +0100 |
commit | db43e59f41b6bc19152cd4743585a3217015e272 (patch) | |
tree | 784e8b5d5c2a574db072e144638efda90e8e3604 /scripts/lib/wic/msger.py | |
parent | 98912687f15f6d7537746fb38499f739e1a47be9 (diff) | |
download | openembedded-core-db43e59f41b6bc19152cd4743585a3217015e272.tar.gz openembedded-core-db43e59f41b6bc19152cd4743585a3217015e272.tar.bz2 openembedded-core-db43e59f41b6bc19152cd4743585a3217015e272.zip |
wic: Code cleanup: long lines, identation and whitespaces
Fixed pylint warnings bad-continuation, bad-continuation and
line-too-long.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/wic/msger.py')
-rw-r--r-- | scripts/lib/wic/msger.py | 23 |
1 files changed, 12 insertions, 11 deletions
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 |