Another portion of the formatting and import fixes #1789
21
src/debug.py
21
src/debug.py
|
@ -35,26 +35,15 @@ Logging is thread-safe so you don't have to worry about locks,
|
||||||
just import and log.
|
just import and log.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# import ConfigParser
|
|
||||||
import sys
|
|
||||||
if sys.version_info[0] == 3:
|
|
||||||
# python 3
|
|
||||||
import configparser as ConfigParser
|
|
||||||
else:
|
|
||||||
# python 2
|
|
||||||
import ConfigParser
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info[0] == 3:
|
from six.moves import configparser
|
||||||
from . import helper_startup
|
|
||||||
from . import state
|
import helper_startup
|
||||||
else:
|
import state
|
||||||
import helper_startup
|
|
||||||
import state
|
|
||||||
|
|
||||||
helper_startup.loadConfig()
|
helper_startup.loadConfig()
|
||||||
|
|
||||||
|
@ -86,7 +75,7 @@ def configureLogging():
|
||||||
False,
|
False,
|
||||||
'Loaded logger configuration from %s' % logging_config
|
'Loaded logger configuration from %s' % logging_config
|
||||||
)
|
)
|
||||||
except (OSError, ConfigParser.NoSectionError, KeyError):
|
except (OSError, configparser.NoSectionError, KeyError):
|
||||||
if os.path.isfile(logging_config):
|
if os.path.isfile(logging_config):
|
||||||
fail_msg = \
|
fail_msg = \
|
||||||
'Failed to load logger configuration from %s, using default' \
|
'Failed to load logger configuration from %s, using default' \
|
||||||
|
|
Reference in New Issue
Block a user