Skip to content

Commit

Permalink
Merge pull request #166 from edx/arbrandes/fix-empty-yaml
Browse files Browse the repository at this point in the history
fix: properly deal with empty yaml files
  • Loading branch information
arbrandes authored Apr 9, 2021
2 parents c934c4f + 86f7e90 commit f4e7a8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion edx_repo_tools/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ def iter_openedx_yaml(hub, orgs, branches=None):
if contents is not None:
LOGGER.debug("Found openedx.yaml at %s:%s", repo.full_name, branch)
try:
yield repo, yaml.safe_load(contents.decoded)
data = yaml.safe_load(contents.decoded)
except Exception as exc:
LOGGER.error("Couldn't parse openedx.yaml from %s:%s, skipping repo", repo.full_name, branch, exc_info=True)
else:
if data is not None:
yield repo, data

break


Expand Down

0 comments on commit f4e7a8d

Please sign in to comment.