mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Do not fail if Github adds an attribute in an object
This commit is contained in:
@@ -84,8 +84,11 @@ def GithubObject( className, *attributePolicies ):
|
||||
|
||||
def _updateAttributes( self, attributes ):
|
||||
for attributeName, attributeValue in attributes.iteritems():
|
||||
attributeDefinition = GithubObject.__attributeDefinitions[ attributeName ]
|
||||
self.__attributes[ attributeName ] = attributeDefinition.getValueFromRawValue( self, attributeValue )
|
||||
try:
|
||||
attributeDefinition = GithubObject.__attributeDefinitions[ attributeName ]
|
||||
self.__attributes[ attributeName ] = attributeDefinition.getValueFromRawValue( self, attributeValue )
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def _markAsCompleted( self ):
|
||||
for attributeName, attributeDefinition in GithubObject.__attributeDefinitions.iteritems():
|
||||
|
||||
Reference in New Issue
Block a user