Replace deprecated readfp method with read_file

The readfp method has been deprecated since version 3.2 [1].

[1] https://docs.python.org/3/library/configparser.html?highlight=deprecated#configparser.ConfigParser.readfp

Change-Id: I5246aef8e07b949273b6c3cc31435b4756ae9d1a
This commit is contained in:
ljhuang 2022-07-22 16:13:25 +08:00
parent bbb0fea943
commit 3983e13908
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ def ini_parse(fd):
:return:
"""
parser = configparser.ConfigParser()
parser.readfp(fd)
parser.read_file(fd)
return dict(parser.items('default'))