Fix pyyaml load call error

yaml.load(input) is deprecated in pyyaml 5.1. This causes the
manifests_lookup function to append the python warning message
to the look up results. The pegleg cmd fails to launch container
due to extra strings after the image url. Added code to ignore the
specific warning in the manifests_lookup to allow the script to
work with newer and older version of the pyyaml library.

Change-Id: I4765df28eedf99a8e823e192cf2f2f2b38434f2c
Signed-off-by: James Gu <james.gu@att.com>
This commit is contained in:
James Gu 2020-02-13 14:31:45 -08:00
parent 88dd435a79
commit 154963be3a
1 changed files with 1 additions and 0 deletions

View File

@ -70,6 +70,7 @@ manifests_lookup(){
RESULT=`python3 -c "
import yaml,sys
yaml.warnings({'YAMLLoadWarning': False})
y = yaml.load_all(open('$file'))
for x in y:
if x.get('schema') == '$schema':