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
changes/40/850740/1
ljhuang 6 months ago
parent 3386bbed48
commit 609f4af8c8

@ -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:

Loading…
Cancel
Save