From 7c51032acdcf3c15ce5f6f42c354c7c65db19b78 Mon Sep 17 00:00:00 2001 From: John Helmert Date: Sun, 9 Jun 2019 21:44:08 -0500 Subject: [PATCH] Revert "Replace deprecated ConfigParser method" This reverts commit de1d06e33c7247ba9159d11e5d51fb72201622e5. It breaks running with python2.7 --- tuir/config.py | 2 +- tuir/theme.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tuir/config.py b/tuir/config.py index 1f8ddbc..b612ae5 100644 --- a/tuir/config.py +++ b/tuir/config.py @@ -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) diff --git a/tuir/theme.py b/tuir/theme.py index 37c0bde..dacd244 100644 --- a/tuir/theme.py +++ b/tuir/theme.py @@ -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)