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:08:38 +0100 |
commit | 34172ef8056244a89cccbbc76de91eca7bc8b0c0 (patch) | |
tree | 91e551985b03e728e4bd1df6acee44f7dc8c7d22 /scripts/lib/wic/msger.py | |
parent | 335aa0fee865c23a067562323641bef1dcae687e (diff) | |
download | poky-34172ef8056244a89cccbbc76de91eca7bc8b0c0.tar.gz |
wic: Code cleanup: long lines, identation and whitespaces
Fixed pylint warnings bad-continuation, bad-continuation and
line-too-long.
(From OE-Core rev: db43e59f41b6bc19152cd4743585a3217015e272)
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 | 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 @@ | |||
16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., 59 |
17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | import os,sys | 19 | import os |
20 | import sys | ||
20 | import re | 21 | import re |
21 | import time | 22 | import time |
22 | 23 | ||
@@ -37,8 +38,8 @@ __ALL__ = ['set_mode', | |||
37 | # COLORs in ANSI | 38 | # COLORs in ANSI |
38 | INFO_COLOR = 32 # green | 39 | INFO_COLOR = 32 # green |
39 | WARN_COLOR = 33 # yellow | 40 | WARN_COLOR = 33 # yellow |
40 | ERR_COLOR = 31 # red | 41 | ERR_COLOR = 31 # red |
41 | ASK_COLOR = 34 # blue | 42 | ASK_COLOR = 34 # blue |
42 | NO_COLOR = 0 | 43 | NO_COLOR = 0 |
43 | 44 | ||
44 | PREFIX_RE = re.compile('^<(.*?)>\s*(.*)', re.S) | 45 | PREFIX_RE = re.compile('^<(.*?)>\s*(.*)', re.S) |
@@ -47,12 +48,12 @@ INTERACTIVE = True | |||
47 | 48 | ||
48 | LOG_LEVEL = 1 | 49 | LOG_LEVEL = 1 |
49 | LOG_LEVELS = { | 50 | LOG_LEVELS = { |
50 | 'quiet': 0, | 51 | 'quiet': 0, |
51 | 'normal': 1, | 52 | 'normal': 1, |
52 | 'verbose': 2, | 53 | 'verbose': 2, |
53 | 'debug': 3, | 54 | 'debug': 3, |
54 | 'never': 4, | 55 | 'never': 4, |
55 | } | 56 | } |
56 | 57 | ||
57 | LOG_FILE_FP = None | 58 | LOG_FILE_FP = None |
58 | LOG_CONTENT = '' | 59 | LOG_CONTENT = '' |
@@ -75,7 +76,7 @@ def _general_print(head, color, msg=None, stream=None, level='normal'): | |||
75 | 76 | ||
76 | errormsg = '' | 77 | errormsg = '' |
77 | if CATCHERR_BUFFILE_FD > 0: | 78 | if CATCHERR_BUFFILE_FD > 0: |
78 | size = os.lseek(CATCHERR_BUFFILE_FD , 0, os.SEEK_END) | 79 | size = os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_END) |
79 | os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_SET) | 80 | os.lseek(CATCHERR_BUFFILE_FD, 0, os.SEEK_SET) |
80 | errormsg = os.read(CATCHERR_BUFFILE_FD, size) | 81 | errormsg = os.read(CATCHERR_BUFFILE_FD, size) |
81 | os.ftruncate(CATCHERR_BUFFILE_FD, 0) | 82 | os.ftruncate(CATCHERR_BUFFILE_FD, 0) |
@@ -158,7 +159,7 @@ def _split_msg(head, msg): | |||
158 | return head, msg | 159 | return head, msg |
159 | 160 | ||
160 | def get_loglevel(): | 161 | def get_loglevel(): |
161 | return (k for k,v in LOG_LEVELS.items() if v==LOG_LEVEL).next() | 162 | return (k for k, v in LOG_LEVELS.items() if v == LOG_LEVEL).next() |
162 | 163 | ||
163 | def set_loglevel(level): | 164 | def set_loglevel(level): |
164 | global LOG_LEVEL | 165 | global LOG_LEVEL |