提交 3810013f 编写于 作者: T Tyler Ramer 提交者: Jamie McAtamney

Use yaml safe_load in gppkg

Use yaml.safe_load rather than yaml.load as yaml.load is deprecated
Co-authored-by: NTyler Ramer <tramer@vmware.com>
Co-authored-by: NJamie McAtamney <jmcatamney@vmware.com>
上级 e1c9b0dd
......@@ -240,7 +240,7 @@ class Gppkg:
for cur_file in archive_list:
if cur_file.endswith(SPECFILE_NAME):
specfile = tarinfo.extractfile(cur_file)
yamlfile = yaml.load(specfile)
yamlfile = yaml.safe_load(specfile)
keys = yamlfile.keys()
break
......@@ -1345,7 +1345,7 @@ class BuildGppkg(Operation):
cur_file = None
with open(specfile) as cur_file:
yamlfile = yaml.load(cur_file)
yamlfile = yaml.safe_load(cur_file)
tags = yamlfile.keys()
......@@ -1368,7 +1368,7 @@ class BuildGppkg(Operation):
try:
with open(specfile) as cur_file:
yamlfile = yaml.load(cur_file)
yamlfile = yaml.safe_load(cur_file)
if not self._verify_tags(yamlfile):
return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册