From de1d06e33c7247ba9159d11e5d51fb72201622e5 Mon Sep 17 00:00:00 2001 From: John Helmert Date: Thu, 6 Jun 2019 19:31:42 -0500 Subject: [PATCH] Replace deprecated ConfigParser method ConfigParser.readfp() -> ConfigParser.read_file() --- rtv/config.py | 2 +- rtv/theme.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtv/config.py b/rtv/config.py index daef147..fb2def4 100644 --- a/rtv/config.py +++ b/rtv/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.readfp(fp) + config.read_file(fp) return cls._parse_rtv_file(config) diff --git a/rtv/theme.py b/rtv/theme.py index 2f8329b..f3f7633 100644 --- a/rtv/theme.py +++ b/rtv/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.readfp(fp) + config.read_file(fp) except configparser.ParsingError as e: raise ConfigError(e.message)