diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/DataFeatures.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py index 29a63e0..951c60e 100644 --- a/src/argaze/DataFeatures.py +++ b/src/argaze/DataFeatures.py @@ -663,9 +663,15 @@ class PipelineStepObject(): for key, value in object_data.items(): - logging.debug('PipelineStepObject.update_attributes %s.%s with %s value', type(self).__name__, key, type(value).__name__) + if hasattr(self, key): - setattr(self, key, value) + logging.debug('PipelineStepObject.update_attributes %s.%s with %s value', type(self).__name__, key, type(value).__name__) + + setattr(self, key, value) + + else: + + raise(AttributeError(f'{type(self).__name__} has not {key} attribute.')) @property def name(self) -> str: |