8000 Update Repository original_license attribute to be nullable · goodwillcoding/github3.py@3f733e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f733e9

Browse files
author
Dejan Svetec
committed
Update Repository original_license attribute to be nullable
1 parent 9dcf87c commit 3f733e9

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