Revert "Replace deprecated ConfigParser method"
This reverts commit de1d06e33c. It breaks
running with python2.7
This commit is contained in:
@@ -250,7 +250,7 @@ class Config(object):
|
||||
config = configparser.ConfigParser()
|
||||
if os.path.exists(filename):
|
||||
with codecs.open(filename, encoding='utf-8') as fp:
|
||||
config.read_file(fp)
|
||||
config.readfp(fp)
|
||||
|
||||
return cls._parse_tuir_file(config)
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ class Theme(object):
|
||||
config = configparser.ConfigParser()
|
||||
config.optionxform = six.text_type # Preserve case
|
||||
with codecs.open(filename, encoding='utf-8') as fp:
|
||||
config.read_file(fp)
|
||||
config.readfp(fp)
|
||||
except configparser.ParsingError as e:
|
||||
raise ConfigError(e.message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user