Skip to content

Commit

Permalink
Merge pull request #45 from akcano/main
Browse files Browse the repository at this point in the history
warn when built with empty repos
  • Loading branch information
akcano authored Oct 4, 2024
2 parents 5d7a707 + ccd5a5b commit 9ed8cbd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion canonical-sphinx-extensions/contributor-listing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ def get_contributors_for_file(pagename, page_source_suffix):
):
since = context["display_contributors_since"]

commits = repo.iter_commits(paths=paths, since=since)
try:
commits = repo.iter_commits(paths=paths, since=since)
except ValueError as e:
logger.warning(
"Failed to iterate through the Git commits: " + str(e)
)
return

contributors_dict = {}
for commit in commits:
Expand Down

0 comments on commit 9ed8cbd

Please sign in to comment.