Skip to content

Commit fc03183

Browse files
committed
Bug #296: python 3.12 compability
Since python 3.2, readfp needs to be replaced by read_file. Python 3.12 dropped the readfp function. Patch provided as PR by me, as the original reporter failed to do so since 4-4-2024 and my systems break due to this issue.
1 parent ccdc386 commit fc03183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ifupdown2/ifupdown/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def read_config(self):
138138
configStr = '[ifupdown2]\n' + config
139139
configFP = io.StringIO(configStr)
140140
parser = configparser.RawConfigParser()
141-
parser.readfp(configFP)
141+
parser.read_file(configFP)
142142
configmap_g = dict(parser.items('ifupdown2'))
143143

144144
# Preprocess config map

0 commit comments

Comments
 (0)