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: I2c4c327297b74631d961850e735d5ddc69459e47
This commit is contained in:
ljhuang 2022-07-22 16:17:15 +08:00
parent 3386bbed48
commit 609f4af8c8
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ def _get_config():
try:
with open(os.path.expanduser("~/.my.cnf")) as dfile:
parser = configparser.ConfigParser()
parser.readfp(dfile)
parser.read_file(dfile)
for k, v in parser.items('client'):
args[k] = v
except IOError as e: