From fc0318378e878ffe639d1d1285936d1256dd67cf Mon Sep 17 00:00:00 2001 From: Jan Huijsmans Date: Tue, 9 Jul 2024 09:03:25 +0200 Subject: [PATCH] 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. --- ifupdown2/ifupdown/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifupdown2/ifupdown/main.py b/ifupdown2/ifupdown/main.py index 8e0f13f4..de6579ea 100644 --- a/ifupdown2/ifupdown/main.py +++ b/ifupdown2/ifupdown/main.py @@ -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