|
1 | | -# -*- coding: utf-8 -*- |
2 | 1 | # © 2015-2019 ACSONE SA/NV |
3 | 2 | # License AGPLv3 (http://www.gnu.org/licenses/agpl-3.0-standalone.html) |
4 | 3 |
|
|
7 | 6 | import sys |
8 | 7 | import threading |
9 | 8 | import traceback |
| 9 | + |
10 | 10 | try: |
11 | | - from Queue import Queue, Empty as EmptyQueue |
| 11 | + from Queue import Empty as EmptyQueue |
| 12 | + from Queue import Queue |
12 | 13 | except ImportError: |
13 | | - from queue import Queue, Empty as EmptyQueue |
| 14 | + from queue import Empty as EmptyQueue |
| 15 | + from queue import Queue |
14 | 16 |
|
15 | 17 | import argparse |
| 18 | +import fnmatch |
| 19 | + |
16 | 20 | import argcomplete |
17 | 21 | import colorama |
18 | | -import fnmatch |
19 | 22 |
|
20 | | -from .utils import ThreadNameKeeper |
21 | | -from .log import DebugLogFormatter |
22 | | -from .log import LogFormatter |
23 | 23 | from .config import load_config |
| 24 | +from .log import DebugLogFormatter, LogFormatter |
24 | 25 | from .repo import Repo |
25 | | - |
| 26 | +from .utils import ThreadNameKeeper |
26 | 27 |
|
27 | 28 | logger = logging.getLogger(__name__) |
28 | 29 |
|
|
31 | 32 |
|
32 | 33 | def _log_level_string_to_int(log_level_string): |
33 | 34 | if log_level_string not in _LOG_LEVEL_STRINGS: |
34 | | - message = 'invalid choice: {0} (choose from {1})'.format( |
35 | | - log_level_string, _LOG_LEVEL_STRINGS) |
| 35 | + message = f'invalid choice: {log_level_string} (choose from {_LOG_LEVEL_STRINGS})' |
36 | 36 | raise argparse.ArgumentTypeError(message) |
37 | 37 |
|
38 | 38 | log_level_int = getattr(logging, log_level_string, logging.INFO) |
@@ -99,7 +99,7 @@ def get_parser(): |
99 | 99 | dest='log_level', |
100 | 100 | type=_log_level_string_to_int, |
101 | 101 | nargs='?', |
102 | | - help='Set the logging output level. {0}'.format(_LOG_LEVEL_STRINGS)) |
| 102 | + help=f'Set the logging output level. {_LOG_LEVEL_STRINGS}') |
103 | 103 |
|
104 | 104 | main_parser.add_argument( |
105 | 105 | '-e', '--expand-env', |
|
0 commit comments