Check types of received attributes

This commit is contained in:
Vincent Jacques
2012-05-09 18:12:30 +02:00
parent ead8fdd165
commit c559faa680
24 changed files with 159 additions and 83 deletions
+1
View File
@@ -89,6 +89,7 @@ class GitCommit( object ):
if "sha" in attributes and attributes[ "sha" ] is not None:
self.__sha = attributes[ "sha" ]
if "tree" in attributes and attributes[ "tree" ] is not None:
assert isinstance( attributes[ "tree" ], dict )
self.__tree = GitTree.GitTree( self.__requester, attributes[ "tree" ], lazy = True )
if "url" in attributes and attributes[ "url" ] is not None:
self.__url = attributes[ "url" ]