1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

test: replace readfp() with read_file()

ConfigParser.readfp() has been deprecated since Python 3.2 and was
dropped completely in Python 3.11.
This commit is contained in:
Frantisek Sumsal 2023-07-05 19:43:43 +02:00 committed by Luca Boccassi
parent c75f81292d
commit ba4a1cd8a8

View File

@ -82,7 +82,7 @@ class SysvGeneratorTest(unittest.TestCase):
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)