aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-11-10 15:42:57 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2021-11-15 09:27:07 +0100
commit4fdbdd34fb5fea55571a18b2438ececa953928ff (patch)
tree44f1d6ff38cedad25b058ba18844e1004b7385db /functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
parente25e576af33547657c278e2dae49b033bf6a1fa1 (diff)
Update linters and fix all new issues
It mostly add encoding in open calls and leverage f-strings. Change-Id: Ifead18fc724a452c1067dcf91dc577032edc9c59 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py')
-rw-r--r--functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
index db276cfdb..2210b3909 100644
--- a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
+++ b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
@@ -36,7 +36,7 @@ class VmController():
self.util = Utilvnf()
self.util.set_credentials(credentials["cloud"])
- with open(self.util.test_env_config_yaml) as file_fd:
+ with open(self.util.test_env_config_yaml, encoding='utf-8') as file_fd:
test_env_config_yaml = yaml.safe_load(file_fd)
file_fd.close()
@@ -101,7 +101,7 @@ class VmController():
def command_create_and_execute(self, ssh, test_cmd_file_path,
cmd_input_param, prompt_file_path):
- with open(prompt_file_path, 'r') as prompt_file:
+ with open(prompt_file_path, 'r', encoding='utf-8') as prompt_file:
prompt = yaml.safe_load(prompt_file)
config_mode_prompt = prompt["config_mode"]