From eb1e6c75c236bd88a3c371befebcb56fa4f9f090 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Mon, 27 May 2019 06:11:29 +0000 Subject: Fix the infra_workload error Fix the yaml loader error which results in failure to load VF modules Change-Id: I1d9a699b9fffd8c9c84e20a8cc9aaa4762c2e7f3 Issue-ID: MULTICLOUD-656 Signed-off-by: Bin Yang --- share/starlingx_base/resource/infra_workload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share') diff --git a/share/starlingx_base/resource/infra_workload.py b/share/starlingx_base/resource/infra_workload.py index 48990d28..9524d673 100644 --- a/share/starlingx_base/resource/infra_workload.py +++ b/share/starlingx_base/resource/infra_workload.py @@ -467,7 +467,7 @@ class InfraWorkloadHelper(infra_workload_helper.InfraWorkloadHelper): 'r') as af: # assume the template file size is small templatedata1["template"] = \ - yaml.safe_load(af.read(), Loader=NoDatesSafeLoader) + yaml.load(af, Loader=NoDatesSafeLoader) # pass elif artifact_type.lower() == "heat_env": @@ -475,8 +475,8 @@ class InfraWorkloadHelper(infra_workload_helper.InfraWorkloadHelper): with open(artifact_path, 'r') as af: # assume the env file size is small - templatedata1.update(yaml.safe_load( - af.read(), Loader=NoDatesSafeLoader)) + templatedata1.update(yaml.load( + af, Loader=NoDatesSafeLoader)) # pass # pass return templatedata1 -- cgit 1.2.3-korg