diff --git a/github/GitTree.py b/github/GitTree.py index 38c696b8..f999de89 100644 --- a/github/GitTree.py +++ b/github/GitTree.py @@ -73,9 +73,14 @@ class GitTree(github.GithubObject.CompletableGithubObject): if "tree" in attributes: # pragma no branch assert attributes["tree"] is None or all(isinstance(element, dict) for element in attributes["tree"]), attributes["tree"] self._tree = None if attributes["tree"] is None else [ - github.GitTreeElement.GitTreeElement(self._requester, element, completed=False) + github.GitTreeElement.GitTreeElement(self._requester, self._headers, element, completed=False) for element in attributes["tree"] ] if "url" in attributes: # pragma no branch assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"] self._url = attributes["url"] + + + + + diff --git a/github/GitTreeElement.py b/github/GitTreeElement.py index f58b57b3..bf361be0 100644 --- a/github/GitTreeElement.py +++ b/github/GitTreeElement.py @@ -30,11 +30,6 @@ class GitTreeElement(github.GithubObject.NonCompletableGithubObject): """ This class represents GitTreeElements 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.NonCompletableGithubObject.__init__(self, requester, {}, attributes, completed) @property def mode(self):