From 8b1bcf0b86fe042703a59f14ba62537406d69eee Mon Sep 17 00:00:00 2001 From: tierno Date: Sat, 23 Nov 2019 22:41:22 +0000 Subject: [PATCH] minor fix in yaml load with Loader Change-Id: I1bc0e7197f6057c942490b710fbaf25013202ecb Signed-off-by: tierno --- n2vc/k8s_helm_conn.py | 2 +- tests/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/n2vc/k8s_helm_conn.py b/n2vc/k8s_helm_conn.py index cd15d73..4e6c4c5 100644 --- a/n2vc/k8s_helm_conn.py +++ b/n2vc/k8s_helm_conn.py @@ -894,7 +894,7 @@ class K8sHelmConnector(K8sConnector): for key in params: value = params.get(key) if '!!yaml' in str(value): - value = yaml.load(value[7:]) + value = yaml.load(value[7:], Loader=yaml.SafeLoader) params2[key] = value values_file = get_random_number() + '.yaml' diff --git a/tests/base.py b/tests/base.py index c7dad6d..e40338f 100644 --- a/tests/base.py +++ b/tests/base.py @@ -108,7 +108,7 @@ def has_metrics(charm): def get_descriptor(descriptor): desc = None try: - tmp = yaml.load(descriptor) + tmp = yaml.load(descriptor, Loader=yaml.Loader) # Remove the envelope root = list(tmp.keys())[0] -- 2.25.1