Fix pyyaml load call error

yaml.load(input) is deprecated in pyyaml 5.1. This causes the
manifests_lookup function to append the python warnign message
to the look up results. The pegleg cmd failed to launch container
due to extra strings after the image url. Added sepcifc yaml loader
in the manifests_lookup to fix this issue.

Change-Id: I4765df28eedf99a8e823e192cf2f2f2b38434f2c
This commit is contained in:
James Gu 2020-02-13 14:31:45 -08:00
parent 88dd435a79
commit ce03b1462d
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ manifests_lookup(){
RESULT=`python3 -c "
import yaml,sys
y = yaml.load_all(open('$file'))
y = yaml.load_all(open('$file'), Loader=yaml.FullLoader)
for x in y:
if x.get('schema') == '$schema':
if x['metadata']['name'] == '$mdata_name':