From 8fced1b2ed30b9cda338c35946d8dcc3820ac25a 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. (cherry picked from commit ba4a1cd8a863f65ff016be72e520c323aa1e1a6f) Related: RHEL-13199 --- 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 484b610a02..84237bab61 100755 --- a/test/sysv-generator-test.py +++ b/test/sysv-generator-test.py @@ -80,7 +80,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)