Skip to content

Commit

Permalink
Merge pull request #274 from sbesson/pyyaml_loader_6.0
Browse files Browse the repository at this point in the history
Always pass a Loader argument to yaml.load
  • Loading branch information
sbesson authored Oct 15, 2021
2 parents 23ed55f + feb2c22 commit 47407f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scc/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def __init__(self, gh, path, remote="origin", push_branch=None,
self.dbg("Reading repository configuration from %s" %
(repository_config))
with open(self.repository_config) as fh:
self.repository_config = yaml.load(fh)
self.repository_config = yaml.load(fh, Loader=yaml.FullLoader)
if self.repository_config is not None:
self.dbg("Repository configuration:\n%s" %
(yaml.dump(self.repository_config)))
Expand Down Expand Up @@ -4119,7 +4119,7 @@ def extact_metadata(self, directory):
if fn == self.META_FILE:
fullpath = os.path.join(dirpath, fn)
with open(fullpath) as fp:
data = yaml.load(fp)
data = yaml.load(fp, Loader=yaml.FullLoader)
# find information about the repository
jinja2 = {}
with open(fullpath) as file:
Expand Down Expand Up @@ -4231,7 +4231,7 @@ def update_data(self, directory, jinja2, version, sha256,
yaml.indent(mapping=2)
# read the meta files and update the value
with open(fullpath) as fp:
data = yaml.load(fp)
data = yaml.load(fp, Loader=yaml.FullLoader)
if data["source"][self.KEY_SHA] and \
self.KEY_SHA not in jinja2.keys():
data["source"][self.KEY_SHA] = sha256
Expand Down

0 comments on commit 47407f3

Please sign in to comment.