This commit is contained in:
Phil Aquilina 2017-08-03 19:40:58 +00:00 committed by GitHub
commit 2cf2b3d929

View File

@ -107,7 +107,7 @@ class ObjectType(six.with_metaclass(ObjectTypeMeta)):
if kwargs: if kwargs:
for prop in list(kwargs): for prop in list(kwargs):
try: try:
if isinstance(getattr(self.__class__, prop), property) or prop.startswith('_'): if prop.startswith('_') or isinstance(getattr(self.__class__, prop), property):
setattr(self, prop, kwargs.pop(prop)) setattr(self, prop, kwargs.pop(prop))
except AttributeError: except AttributeError:
pass pass