From 6ff14fe8826bcb0f635319a51032900c862a9728 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 11 Sep 2021 10:24:53 +0200 Subject: Set encoding utf-8 when opening file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4e756552173247499ba882bfee4fbe8738fbae3d Signed-off-by: Cédric Ollivier --- functest_kubernetes/cnf_conformance/conformance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'functest_kubernetes/cnf_conformance') diff --git a/functest_kubernetes/cnf_conformance/conformance.py b/functest_kubernetes/cnf_conformance/conformance.py index fa174f1a..2cf4baa9 100644 --- a/functest_kubernetes/cnf_conformance/conformance.py +++ b/functest_kubernetes/cnf_conformance/conformance.py @@ -76,7 +76,8 @@ class CNFConformance(testcase.TestCase): lfiles = glob.glob(os.path.join( self.src_dir, 'results', 'cnf-testsuite-results-*.yml')) results = max(lfiles, key=os.path.getmtime) - with open(os.path.join(self.src_dir, 'results', results)) as yfile: + with open(os.path.join( + self.src_dir, 'results', results), encoding='utf-8') as yfile: self.details = yaml.safe_load(yfile) msg = prettytable.PrettyTable( header_style='upper', padding_width=5, -- cgit 1.2.3-korg