From 4fdbdd34fb5fea55571a18b2438ececa953928ff Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 10 Nov 2021 15:42:57 +0100 Subject: Update linters and fix all new issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It mostly add encoding in open calls and leverage f-strings. Change-Id: Ifead18fc724a452c1067dcf91dc577032edc9c59 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/barbican/barbican.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functest/opnfv_tests/openstack/barbican') diff --git a/functest/opnfv_tests/openstack/barbican/barbican.py b/functest/opnfv_tests/openstack/barbican/barbican.py index 0c2429e10..706304bbf 100644 --- a/functest/opnfv_tests/openstack/barbican/barbican.py +++ b/functest/opnfv_tests/openstack/barbican/barbican.py @@ -32,6 +32,6 @@ class Barbican(tempest.TempestCommon): if not rconfig.has_section('image-feature-enabled'): rconfig.add_section('image-feature-enabled') rconfig.set('image-feature-enabled', 'api_v1', False) - with open(self.conf_file, 'w') as config_file: + with open(self.conf_file, 'w', encoding='utf-8') as config_file: rconfig.write(config_file) self.backup_tempest_config(self.conf_file, self.res_dir) -- cgit 1.2.3-korg