From ba4a1cd8a863f65ff016be72e520c323aa1e1a6f Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 5 Jul 2023 19:43:43 +0200 Subject: [PATCH] test: replace readfp() with read_file() ConfigParser.readfp() has been deprecated since Python 3.2 and was dropped completely in Python 3.11. --- test/sysv-generator-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py index 1fe4153abc4..24fafbaaa49 100755 --- a/test/sysv-generator-test.py +++ b/test/sysv-generator-test.py @@ -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)