Fix completion and lazyness

This commit is contained in:
Vincent Jacques
2012-05-03 22:30:06 +01:00
parent 2f536fd95d
commit 82dc2225a7
31 changed files with 124 additions and 62 deletions
+4 -2
View File
@@ -29,6 +29,8 @@ class Repository( object ):
self.__completed = False
self.__initAttributes()
self.__useAttributes( attributes )
if not lazy:
self.__complete()
@property
def clone_url( self ):
@@ -215,17 +217,17 @@ class Repository( object ):
def __completeIfNeeded( self, testedAttribute ):
if not self.__completed and testedAttribute is None:
self.__complete()
self.__completed = True
# @todo Do not generate __complete if type has no url attribute
def __complete( self ):
result = self.__github._dataRequest(
"GET",
self.url,
self.__url,
None,
None
)
self.__useAttributes( result )
self.__completed = True
def add_to_collaborators( self, collaborator ):
pass