From: Brandon Maier Date: Tue, 4 Jun 2024 16:16:06 +0000 (+0000) Subject: tools: binman: fix deprecated Python ConfigParser methods X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=698b60a6a23a29a556d5a00c5eead63fb3fdd4f3;p=u-boot.git tools: binman: fix deprecated Python ConfigParser methods 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 CC: Simon Glass Reviewed-by: Simon Glass --- diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py index e225ac2ca0..aea724fc55 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.