@@ -87,7 +87,7 @@ def __init__(self, repo, session=None):
8787 #: ``datetime`` object representing the last time the repository was
8888 # updated.
8989 self .updated_at = self ._strptime (repo .get ('updated_at' ))
90- self ._api = repo .get ('url' )
90+ self ._api = repo .get ('url' , '' )
9191
9292 # The number of watchers
9393 #: Number of users watching the repository.
@@ -1309,7 +1309,7 @@ class Contents(GitHubObject):
13091309 def __init__ (self , content ):
13101310 super (Contents , self ).__init__ (content )
13111311 # links
1312- self ._api = content ['_links' ].get ('self' )
1312+ self ._api = content ['_links' ].get ('self' , '' )
13131313 #: Dictionary of links
13141314 self .links = content .get ('_links' )
13151315
@@ -1361,7 +1361,7 @@ class Download(GitHubCore):
13611361
13621362 def __init__ (self , download , session = None ):
13631363 super (Download , self ).__init__ (download , session )
1364- self ._api = download .get ('url' )
1364+ self ._api = download .get ('url' , '' )
13651365 #: URL of the download at GitHub.
13661366 self .html_url = download .get ('html_url' )
13671367 #: Unique id of the download on GitHub.
@@ -1410,7 +1410,7 @@ class Hook(GitHubCore):
14101410
14111411 def __init__ (self , hook , session = None ):
14121412 super (Hook , self ).__init__ (hook , session )
1413- self ._api = hook .get ('url' )
1413+ self ._api = hook .get ('url' , '' )
14141414 #: datetime object representing when this hook was last updated.
14151415 self .updated_at = None
14161416 if hook .get ('updated_at' ):
@@ -1624,7 +1624,7 @@ class Comparison(GitHubObject):
16241624
16251625 def __init__ (self , compare ):
16261626 super (Comparison , self ).__init__ (compare )
1627- self ._api = compare .get ('api' )
1627+ self ._api = compare .get ('api' , '' )
16281628 #: URL to view the comparison at GitHub
16291629 self .html_url = compare .get ('html_url' )
16301630 #: Permanent link to this comparison.
0 commit comments