diff options
Diffstat (limited to 'scripts/lib/wic/msger.py')
-rw-r--r-- | scripts/lib/wic/msger.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/wic/msger.py b/scripts/lib/wic/msger.py index 9f557e7b9a..35b705b867 100644 --- a/scripts/lib/wic/msger.py +++ b/scripts/lib/wic/msger.py | |||
@@ -60,7 +60,7 @@ CATCHERR_BUFFILE_FD = -1 | |||
60 | CATCHERR_BUFFILE_PATH = None | 60 | CATCHERR_BUFFILE_PATH = None |
61 | CATCHERR_SAVED_2 = -1 | 61 | CATCHERR_SAVED_2 = -1 |
62 | 62 | ||
63 | def _general_print(head, color, msg = None, stream = None, level = 'normal'): | 63 | def _general_print(head, color, msg=None, stream=None, level='normal'): |
64 | global LOG_CONTENT | 64 | global LOG_CONTENT |
65 | if not stream: | 65 | if not stream: |
66 | stream = sys.stdout | 66 | stream = sys.stdout |
@@ -130,7 +130,7 @@ def _color_print(head, color, msg, stream, level): | |||
130 | 130 | ||
131 | stream.flush() | 131 | stream.flush() |
132 | 132 | ||
133 | def _color_perror(head, color, msg, level = 'normal'): | 133 | def _color_perror(head, color, msg, level='normal'): |
134 | if CATCHERR_BUFFILE_FD > 0: | 134 | if CATCHERR_BUFFILE_FD > 0: |
135 | _general_print(head, color, msg, sys.stdout, level) | 135 | _general_print(head, color, msg, sys.stdout, level) |
136 | else: | 136 | else: |
@@ -190,7 +190,7 @@ def info(msg): | |||
190 | 190 | ||
191 | def verbose(msg): | 191 | def verbose(msg): |
192 | head, msg = _split_msg('Verbose', msg) | 192 | head, msg = _split_msg('Verbose', msg) |
193 | _general_print(head, INFO_COLOR, msg, level = 'verbose') | 193 | _general_print(head, INFO_COLOR, msg, level='verbose') |
194 | 194 | ||
195 | def warning(msg): | 195 | def warning(msg): |
196 | head, msg = _split_msg('Warning', msg) | 196 | head, msg = _split_msg('Warning', msg) |
@@ -198,7 +198,7 @@ def warning(msg): | |||
198 | 198 | ||
199 | def debug(msg): | 199 | def debug(msg): |
200 | head, msg = _split_msg('Debug', msg) | 200 | head, msg = _split_msg('Debug', msg) |
201 | _color_perror(head, ERR_COLOR, msg, level = 'debug') | 201 | _color_perror(head, ERR_COLOR, msg, level='debug') |
202 | 202 | ||
203 | def error(msg): | 203 | def error(msg): |
204 | head, msg = _split_msg('Error', msg) | 204 | head, msg = _split_msg('Error', msg) |
@@ -299,7 +299,7 @@ def disable_logstderr(): | |||
299 | global CATCHERR_BUFFILE_PATH | 299 | global CATCHERR_BUFFILE_PATH |
300 | global CATCHERR_SAVED_2 | 300 | global CATCHERR_SAVED_2 |
301 | 301 | ||
302 | raw(msg = None) # flush message buffer and print it. | 302 | raw(msg=None) # flush message buffer and print it. |
303 | os.dup2(CATCHERR_SAVED_2, 2) | 303 | os.dup2(CATCHERR_SAVED_2, 2) |
304 | os.close(CATCHERR_SAVED_2) | 304 | os.close(CATCHERR_SAVED_2) |
305 | os.close(CATCHERR_BUFFILE_FD) | 305 | os.close(CATCHERR_BUFFILE_FD) |