File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change 35
35
just import and log.
36
36
"""
37
37
38
- # import ConfigParser
39
- import sys
40
- if sys .version_info [0 ] == 3 :
41
- # python 3
42
- import configparser as ConfigParser
43
- else :
44
- # python 2
45
- import ConfigParser
46
-
47
38
import logging
48
39
import logging .config
49
40
import os
50
41
import sys
51
42
52
- if sys .version_info [0 ] == 3 :
53
- from . import helper_startup
54
- from . import state
55
- else :
56
- import helper_startup
57
- import state
43
+ from six .moves import configparser
44
+
45
+ import helper_startup
46
+ import state
58
47
59
48
helper_startup .loadConfig ()
60
49
@@ -86,7 +75,7 @@ def configureLogging():
86
75
False ,
87
76
'Loaded logger configuration from %s' % logging_config
88
77
)
89
- except (OSError , ConfigParser .NoSectionError , KeyError ):
78
+ except (OSError , configparser .NoSectionError , KeyError ):
90
79
if os .path .isfile (logging_config ):
91
80
fail_msg = \
92
81
'Failed to load logger configuration from %s, using default' \
You can’t perform that action at this time.
0 commit comments