diff --git a/github/ContentFile.py b/github/ContentFile.py index f38591f8..fda1d3d6 100644 --- a/github/ContentFile.py +++ b/github/ContentFile.py @@ -30,9 +30,6 @@ class ContentFile(github.GithubObject.CompletableGithubObject): """ This class represents ContentFiles as returned for example by http://developer.github.com/v3/todo """ - def __init__(self, requester, attributes, completed): - # Adapte for __init__ change, remove later - github.GithubObject.CompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def content(self): diff --git a/github/Repository.py b/github/Repository.py index 25fc4a14..2233b5d8 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -888,7 +888,7 @@ class Repository(github.GithubObject.CompletableGithubObject): url_parameters, None ) - return github.ContentFile.ContentFile(self._requester, data, completed=True) + return github.ContentFile.ContentFile(self._requester, headers, data, completed=True) def get_dir_contents(self, path, ref=github.GithubObject.NotSet): """ @@ -919,7 +919,7 @@ class Repository(github.GithubObject.CompletableGithubObject): ) return [ - github.ContentFile.ContentFile(self._requester, attributes, completed=(attributes["type"] != "file")) # Lazy completion only makes sense for files. See discussion here: https://github.com/jacquev6/PyGithub/issues/140#issuecomment-13481130 + github.ContentFile.ContentFile(self._requester, headers, attributes, completed=(attributes["type"] != "file")) # Lazy completion only makes sense for files. See discussion here: https://github.com/jacquev6/PyGithub/issues/140#issuecomment-13481130 for attributes in data ] @@ -1428,7 +1428,7 @@ class Repository(github.GithubObject.CompletableGithubObject): url_parameters, None ) - return github.ContentFile.ContentFile(self._requester, data, completed=True) + return github.ContentFile.ContentFile(self._requester, headers, data, completed=True) def get_stargazers(self): """