Revert "Replace deprecated ConfigParser method"

This reverts commit de1d06e33c. It breaks
running with python2.7
This commit is contained in:
John Helmert
2019-06-09 21:44:08 -05:00
parent 3cd9b2db46
commit 7c51032acd
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)