X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FQemuUtils.py;h=f31e153bd21f6af96dc0db12fcf89dca4ade9622;hp=09c3df77256e0122943d37a53451763c61d7551a;hb=b55e324d526e5b05baef015c3614b9743c955992;hpb=5147d3ac0844b31852a3c221759f31915744b1c7 diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index 09c3df7725..f31e153bd2 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -236,7 +236,7 @@ class QemuUtils: template = f"{Constants.RESOURCES_TPL_VM}/{self._opt.get(u'vnf')}.exec" exec_cmd_no_error(self._node, f"rm -f {running}", sudo=True) - with open(template, "r") as src_file: + with open(template, u"rt") as src_file: src = Template(src_file.read()) exec_cmd_no_error( self._node, f"echo '{src.safe_substitute(**kwargs)}' | " @@ -296,7 +296,7 @@ class QemuUtils: init = self._temp.get(u"ini") exec_cmd_no_error(self._node, f"rm -f {init}", sudo=True) - with open(template, "r") as src_file: + with open(template, u"rt") as src_file: src = Template(src_file.read()) exec_cmd_no_error( self._node, f"echo '{src.safe_substitute(**kwargs)}' | "