diff options
Diffstat (limited to 'functest_kubernetes/k8stest.py')
-rw-r--r-- | functest_kubernetes/k8stest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/functest_kubernetes/k8stest.py b/functest_kubernetes/k8stest.py index b450dac4..34c8ab94 100644 --- a/functest_kubernetes/k8stest.py +++ b/functest_kubernetes/k8stest.py @@ -78,7 +78,8 @@ class E2ETesting(testcase.TestCase): cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) as process: boutput = process.stdout.read() - with open(os.path.join(self.res_dir, 'e2e.log'), 'wb') as foutput: + with open(os.path.join( + self.res_dir, 'e2e.log'), 'w', encoding='utf-8') as foutput: foutput.write(boutput) grp = re.search( r'^(FAIL|SUCCESS)!.* ([0-9]+) Passed \| ([0-9]+) Failed \|' @@ -145,5 +146,6 @@ class E2ETesting(testcase.TestCase): "GcrReleaseRegistry": "{}/gke-release".format(gcr_repo), "MicrosoftRegistry": "mcr.microsoft.com", } - with open("{}/repositories.yml".format(self.res_dir), 'w') as file: + with open("{}/repositories.yml".format( + self.res_dir), 'w', encoding='utf-8') as file: yaml.dump(repo_list, file) |