Structure some attributes

This commit is contained in:
Vincent Jacques
2012-05-09 18:20:44 +02:00
parent f23ad16aaa
commit f14d761344
9 changed files with 183 additions and 129 deletions
+2
View File
@@ -54,8 +54,10 @@ class GitTree( object ):
def __useAttributes( self, attributes ):
#@todo No need to check if attribute is in attributes when attribute is mandatory
if "sha" in attributes and attributes[ "sha" ] is not None:
assert isinstance( attributes[ "sha" ], ( str, unicode ) )
self.__sha = attributes[ "sha" ]
if "tree" in attributes and attributes[ "tree" ] is not None:
self.__tree = attributes[ "tree" ]
if "url" in attributes and attributes[ "url" ] is not None:
assert isinstance( attributes[ "url" ], ( str, unicode ) )
self.__url = attributes[ "url" ]