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: Ibac238ce9787829b7bf69f878b5c3f604c37e142
This commit is contained in:
ljhuang 2022-07-22 16:20:50 +08:00
parent 98063d3fd9
commit 39a1e33f7b
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ def read_template_variables(variable_file=None, verbose=False,
# key-sensitive keys
if variable_file:
cp.optionxform = lambda option: option
cp.readfp(open(variable_file))
cp.read_file(open(variable_file))
variables = cp.defaults()
if scenario_args:
variables.update(scenario_args)