Set utf-8 in decode and encode calls
[functest.git] / functest / opnfv_tests / openstack / refstack / refstack.py
index 5e06c8c..a58efcf 100644 (file)
@@ -52,7 +52,7 @@ class Refstack(tempest.TempestCommon):
         yaml_data2 = ""
         for line in output.splitlines():
             try:
-                grp = re.search(r'^([^\[]*)(\[.*\])\n*$', line.decode())
+                grp = re.search(r'^([^\[]*)(\[.*\])\n*$', line.decode("utf-8"))
                 yaml_data2 = "{}\n{}: {}".format(
                     yaml_data2, grp.group(1), grp.group(2))
             except Exception:  # pylint: disable=broad-except