Update GitTree.py

This commit is contained in:
AKFish
2013-08-21 13:30:39 +08:00
parent 274ab70f87
commit 02435f3a9f
2 changed files with 6 additions and 6 deletions
+6 -1
View File
@@ -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"]
-5
View File
@@ -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):