Skip to content

Commit

Permalink
Bug #296: python 3.12 compability
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
KoffieNu committed Jul 9, 2024
1 parent ccdc386 commit fc03183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ifupdown2/ifupdown/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def read_config(self):
configStr = '[ifupdown2]\n' + config
configFP = io.StringIO(configStr)
parser = configparser.RawConfigParser()
parser.readfp(configFP)
parser.read_file(configFP)
configmap_g = dict(parser.items('ifupdown2'))

# Preprocess config map
Expand Down

0 comments on commit fc03183

Please sign in to comment.