From 3f733e986c37308869d15e5900898a6be02453ab Mon Sep 17 00:00:00 2001 From: Dejan Svetec Date: Tue, 29 Mar 2016 20:49:58 +0200 Subject: [PATCH] Update Repository original_license attribute to be nullable --- github3/repos/repo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/github3/repos/repo.py b/github3/repos/repo.py index 3baeb753c..08ff8d2d5 100644 --- a/github3/repos/repo.py +++ b/github3/repos/repo.py @@ -117,7 +117,9 @@ def _update_attributes(self, repo): # License containing only key, name, url & featured #: :class:`License ` object representing the #: repository license. - self.original_license = License(repo.get('license', {}), self) + self.original_license = repo.get('license') + if self.original_license: + self.original_license = License(self.original_license, self) #: Mirror property. self.mirror_url = repo.get('mirror_url', '')