summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-05-27 06:11:29 +0000
committerBin Yang <bin.yang@windriver.com>2019-05-27 06:11:29 +0000
commiteb1e6c75c236bd88a3c371befebcb56fa4f9f090 (patch)
tree2e904e6b4b89530740b8fbc46bb6c35c9ea4a747 /share
parentcc399bdde795b839add743b7ad6e5f97d4b895b6 (diff)
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 <bin.yang@windriver.com>
Diffstat (limited to 'share')
-rw-r--r--share/starlingx_base/resource/infra_workload.py6
1 files changed, 3 insertions, 3 deletions
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