]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology-openstack: strip out unicode tags for interim test repo yaml 1266/head
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Mon, 4 Mar 2019 18:18:10 +0000 (19:18 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Wed, 13 Mar 2019 15:16:53 +0000 (16:16 +0100)
When json file loads from file for --test-repo it is converted
to u'' instead of bare str. Later yaml.dump includes unicode
tags in resulting yaml which makes teuthology-suite fail and
throw an exception.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@gmail.com>
teuthology/openstack/__init__.py

index 0f4abca63712e49315e4966b79e86d2a4a5e350e..dbe237a4624ead11489ff61c33c6a179e69aabe0 100644 (file)
@@ -692,7 +692,7 @@ class TeuthologyOpenStack(OpenStack):
                     }
                 }
             }
-            yaml_data = yaml.dump(overrides, default_flow_style=False)
+            yaml_data = yaml.safe_dump(overrides, default_flow_style=False)
             with tempfile.NamedTemporaryFile(mode='w+b',
                                              suffix='-artifact.yaml',
                                              delete=False) as f: