You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.0 KiB
29 lines
1.0 KiB
6 months ago
|
From 8fced1b2ed30b9cda338c35946d8dcc3820ac25a Mon Sep 17 00:00:00 2001
|
||
|
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
||
|
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)
|