Skip to content

Commit b75585f

Browse files
committed
Rewritten the weird imports in debug
1 parent 822f58e commit b75585f

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

src/debug.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,15 @@
3535
just import and log.
3636
"""
3737

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-
4738
import logging
4839
import logging.config
4940
import os
5041
import sys
5142

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
5847

5948
helper_startup.loadConfig()
6049

@@ -86,7 +75,7 @@ def configureLogging():
8675
False,
8776
'Loaded logger configuration from %s' % logging_config
8877
)
89-
except (OSError, ConfigParser.NoSectionError, KeyError):
78+
except (OSError, configparser.NoSectionError, KeyError):
9079
if os.path.isfile(logging_config):
9180
fail_msg = \
9281
'Failed to load logger configuration from %s, using default' \

0 commit comments

Comments
 (0)