diff options
author | Théo de la Hogue | 2024-01-24 15:30:04 +0100 |
---|---|---|
committer | Théo de la Hogue | 2024-01-24 15:30:04 +0100 |
commit | 0fa1d2cdc2fa7ef58cd8f9b0eb0cec3ed713e66e (patch) | |
tree | 4ea4bf1bca3b0debe9d9491e869879c2790860d2 | |
parent | d8d957d0e09b582ad14854a823f3b5d1a0964d71 (diff) | |
download | argaze-0fa1d2cdc2fa7ef58cd8f9b0eb0cec3ed713e66e.zip argaze-0fa1d2cdc2fa7ef58cd8f9b0eb0cec3ed713e66e.tar.gz argaze-0fa1d2cdc2fa7ef58cd8f9b0eb0cec3ed713e66e.tar.bz2 argaze-0fa1d2cdc2fa7ef58cd8f9b0eb0cec3ed713e66e.tar.xz |
Using if statement instead of try/except statement.
-rw-r--r-- | src/argaze/DataFeatures.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py index ac4a176..793f498 100644 --- a/src/argaze/DataFeatures.py +++ b/src/argaze/DataFeatures.py @@ -456,17 +456,13 @@ def PipelineStepMethod(method): for observer_name, observer in self.observers.items(): # Does the observer cares about this method? - try: + if subscription_name in dir(observer): subscription = getattr(observer, subscription_name) # Call subscription subscription(timestamp, self) - except AttributeError: - - pass - return result return wrapper |