Skip to content

Commit 10e1f34

Browse files
committed
don't break if GH doesn't know the committer/author
1 parent c998aac commit 10e1f34

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

github3/git.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,15 @@ def __init__(self, commit, session=None):
6161
#: dict containing at least the name, email and date the commit was
6262
# created
6363
self.author = commit.get('author', {})
64+
if self.author is None:
65+
self.author = {}
6466
self._author_name = self.author.get('name', '')
6567

6668
#: dict containing similar information to the author attribute
6769
self.committer = commit.get('committer', {})
70+
if self.committer is None:
71+
# blank the data if GH returns no data
72+
self.committer = {}
6873
self._commit_name = self.committer.get('name', '')
6974

7075
#: :class:`Tree <Tree>` the commit belongs to.

0 commit comments

Comments
 (0)