Remove completion functions from GitAuthor

This commit is contained in:
Vincent Jacques
2012-05-09 18:22:33 +02:00
parent b46ed0dfde
commit 1292bf0e22
-20
View File
@@ -14,22 +14,17 @@ class GitAuthor( object ):
self.__completed = False
self.__initAttributes()
self.__useAttributes( attributes )
if not lazy:
self.__complete()
@property
def date( self ):
self.__completeIfNeeded( self.__date )
return self.__date
@property
def email( self ):
self.__completeIfNeeded( self.__email )
return self.__email
@property
def name( self ):
self.__completeIfNeeded( self.__name )
return self.__name
def __initAttributes( self ):
@@ -37,21 +32,6 @@ class GitAuthor( object ):
self.__email = None
self.__name = None
def __completeIfNeeded( self, testedAttribute ):
if not self.__completed and testedAttribute is None:
self.__complete()
# @todo Do not generate __complete if type has no url attribute
def __complete( self ):
status, headers, data = self.__requester.request(
"GET",
self.__url,
None,
None
)
self.__useAttributes( data )
self.__completed = True
def __useAttributes( self, attributes ):
#@todo No need to check if attribute is in attributes when attribute is mandatory
if "date" in attributes and attributes[ "date" ] is not None: