diff options
author | Joris Roovers <joris.roovers@gmail.com> | 2020-10-31 09:39:43 +0100 |
---|---|---|
committer | Joris Roovers <joris.roovers@gmail.com> | 2020-11-01 10:58:58 +0100 |
commit | 8b4a41cf18f2326816d6a0dac996f32d2fce50f3 (patch) | |
tree | cd9f423a43edbdcf56452edd25a94288a32c2ab8 | |
parent | 5d5aa57cc939dd8db879a9b95211b98462bc4c09 (diff) |
Replaces deprecated readfp() with read_file()
ConfigParser.readfp() is deprecated in Python 3, replaced it with
ConfigParser.read_file().
Relates to #151
-rw-r--r-- | gitlint/config.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gitlint/config.py b/gitlint/config.py index bd4a081..2e50046 100644 --- a/gitlint/config.py +++ b/gitlint/config.py @@ -425,8 +425,7 @@ class LintConfigBuilder: parser = ConfigParser() with io.open(filename, encoding=DEFAULT_ENCODING) as config_file: - # readfp() is deprecated in python 3.2+, but compatible with 2.7 - parser.readfp(config_file, filename) # pylint: disable=deprecated-method + parser.read_file(config_file, filename) for section_name in parser.sections(): for option_name, option_value in parser.items(section_name): |