Use RawConfigParser instead of ConfigParser in tsstats.config
because General.datetimeformat creates problems with string-interpolation. These are solved by swichting to RawConfigParser, which doesn't support this feature.
This commit is contained in:
parent
52fc1b487c
commit
799f622201
|
@ -1,9 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from configparser import ConfigParser
|
from configparser import RawConfigParser
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ConfigParser import ConfigParser
|
from ConfigParser import RawConfigParser
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ def load(path=None):
|
||||||
:rtype: tuple
|
:rtype: tuple
|
||||||
'''
|
'''
|
||||||
logger.debug('reading config')
|
logger.debug('reading config')
|
||||||
config = ConfigParser()
|
config = RawConfigParser()
|
||||||
# use this way to set defaults, because ConfigParser.read_dict
|
# use this way to set defaults, because ConfigParser.read_dict
|
||||||
# is not available < 3.2
|
# is not available < 3.2
|
||||||
for section, items in DEFAULT_CONFIG.items():
|
for section, items in DEFAULT_CONFIG.items():
|
||||||
|
|
Loading…
Reference in New Issue