From 799f6222010bbce187149e9bc1a95fa591a5c56d Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 17 Sep 2016 22:42:32 +0200 Subject: [PATCH] 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. --- tsstats/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsstats/config.py b/tsstats/config.py index 79dde4e..a00f447 100644 --- a/tsstats/config.py +++ b/tsstats/config.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- try: - from configparser import ConfigParser + from configparser import RawConfigParser except ImportError: - from ConfigParser import ConfigParser + from ConfigParser import RawConfigParser import logging @@ -34,7 +34,7 @@ def load(path=None): :rtype: tuple ''' logger.debug('reading config') - config = ConfigParser() + config = RawConfigParser() # use this way to set defaults, because ConfigParser.read_dict # is not available < 3.2 for section, items in DEFAULT_CONFIG.items():