[PATCH 2/3] tools: binman: fix deprecated Python ConfigParser methods

Brandon Maier brandon.maier at collins.com
Tue Jun 4 18:16:06 CEST 2024


The method `ConfigParser.readfp()` is marked deprecated[1].

In Python 3.12 this method have been removed, so replace it with
`ConfigParser.read_file()`.

[1] https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp

Signed-off-by: Brandon Maier <brandon.maier at collins.com>
CC: Simon Glass <sjg at chromium.org>
---
 tools/buildman/bsettings.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py
index e225ac2ca0f..aea724fc559 100644
--- a/tools/buildman/bsettings.py
+++ b/tools/buildman/bsettings.py
@@ -29,7 +29,7 @@ def setup(fname=''):
             settings.read(config_fname)
 
 def add_file(data):
-    settings.readfp(io.StringIO(data))
+    settings.read_file(io.StringIO(data))
 
 def get_items(section):
     """Get the items from a section of the config.
-- 
2.45.1



More information about the U-Boot mailing list