From 39a1e33f7bc04209e9a3ab086c1e0734548f3158 Mon Sep 17 00:00:00 2001 From: ljhuang Date: Fri, 22 Jul 2022 16:20:50 +0800 Subject: [PATCH] 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 --- sahara_tests/scenario/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sahara_tests/scenario/utils.py b/sahara_tests/scenario/utils.py index 474a27a5..69b0dc64 100644 --- a/sahara_tests/scenario/utils.py +++ b/sahara_tests/scenario/utils.py @@ -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)