Skip to content

Commit

Permalink
test: replace readfp() with read_file()
Browse files Browse the repository at this point in the history
ConfigParser.readfp() has been deprecated since Python 3.2 and was
dropped completely in Python 3.11.

(cherry picked from commit ba4a1cd)
  • Loading branch information
mrc0mmand authored and bluca committed Jul 7, 2023
1 parent f74337b commit 7dc6ccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/sysv-generator-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run_generator(self, expect_error=False):
cp = RawConfigParser(dict_type=MultiDict)
cp.optionxform = lambda o: o # don't lower-case option names
with open(service) as f:
cp.readfp(f)
cp.read_file(f)
results[os.path.basename(service)] = cp

return (err, results)
Expand Down

0 comments on commit 7dc6ccc

Please sign in to comment.