Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions source/_ext/gitstamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ def page_context_handler(app, pagename, templatename, context, doctree):
# Try searching the commit hash instead
gh_commit = gh_repo.get_commit(commit.hexsha)
if gh_commit:
user.name = gh_commit.author.name
user.login = gh_commit.author.login
user.avatar_url = gh_commit.author.avatar_url
try:
user.name = gh_commit.author.name
user.login = gh_commit.author.login
user.avatar_url = gh_commit.author.avatar_url
except:
user.name = '<unknown>'
user.login = '<unknown>'
user.avatar_url = None

gh_user_cache[commit.author.email] = user
context['gitauthor'] = user.name
Expand Down