aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-01-24 15:30:04 +0100
committerThéo de la Hogue2024-01-24 15:30:04 +0100
commit0fa1d2cdc2fa7ef58cd8f9b0eb0cec3ed713e66e (patch)
tree4ea4bf1bca3b0debe9d9491e869879c2790860d2
parentd8d957d0e09b582ad14854a823f3b5d1a0964d71 (diff)
downloadargaze-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.py6
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