8000 Merge pull request #593 from dsvetec/issue#591 · goodwillcoding/github3.py@500138a · GitHub
[go: up one dir, main page]

Skip to content

Commit 500138a

Browse files
committed
Merge pull request sigmavirus24#593 from dsvetec/issue#591
Update Repository original_license attribute to be nullable
2 parents ae308fd + 3f733e9 commit 500138a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

github3/repos/repo.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ def _update_attributes(self, repo):
117117
# License containing only key, name, url & featured
118118
#: :class:`License <github3.licenses.License>` object representing the
119119
#: repository license.
120-
self.original_license = License(repo.get('license', {}), self)
120+
self.original_license = repo.get('license')
121+
if self.original_license:
122+
self.original_license = License(self.original_license, self)
121123

122124
#: Mirror property.
123125
self.mirror_url = repo.get('mirror_url', '')

0 commit comments

Comments
 (0)
0