aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes/security
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-09-11 10:24:53 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-09-11 10:54:47 +0200
commit6ff14fe8826bcb0f635319a51032900c862a9728 (patch)
treed152c672a91caf9bce730fb5f105388a1f6db0ae /functest_kubernetes/security
parente2f255aaaddeb0b7bebd7a158b535aa0ecdf55e0 (diff)
Set encoding utf-8 when opening file
Change-Id: I4e756552173247499ba882bfee4fbe8738fbae3d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest_kubernetes/security')
-rw-r--r--functest_kubernetes/security/security.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/functest_kubernetes/security/security.py b/functest_kubernetes/security/security.py
index b6f19c75..3d36679f 100644
--- a/functest_kubernetes/security/security.py
+++ b/functest_kubernetes/security/security.py
@@ -66,7 +66,8 @@ class SecurityTesting(testcase.TestCase):
self.__logger.debug("create_namespace: %s", api_response)
with open(pkg_resources.resource_filename(
"functest_kubernetes",
- "security/{}.yaml".format(self.job_name))) as yfile:
+ "security/{}.yaml".format(self.job_name)),
+ encoding='utf-8') as yfile:
template = Template(yfile.read())
body = yaml.safe_load(template.render(
dockerhub_repo=os.getenv("DOCKERHUB_REPO",