aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-25 12:15:07 +0200
committerThéo de la Hogue2024-04-25 12:15:07 +0200
commitb2f4a65622e88a156a2af84f21ed9e83bd608821 (patch)
treea7f93c3f1ca427b89eb4b78147129edaf0dad96f
parent7dd65358f565b4ff8fd12fd280255391fff3930d (diff)
downloadargaze-b2f4a65622e88a156a2af84f21ed9e83bd608821.zip
argaze-b2f4a65622e88a156a2af84f21ed9e83bd608821.tar.gz
argaze-b2f4a65622e88a156a2af84f21ed9e83bd608821.tar.bz2
argaze-b2f4a65622e88a156a2af84f21ed9e83bd608821.tar.xz
Using get_class_properties in as_dict function.
-rw-r--r--src/argaze/DataFeatures.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index 1964093..0791d5e 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -245,11 +245,12 @@ def as_dict(obj: any, filter: bool = True) -> dict:
"""
_dict = {}
- for p in properties(obj.__class__):
+ for p in get_class_properties(obj.__class__):
v = getattr(obj, p)
if not filter or v is not None:
+
_dict[p] = v
return _dict
@@ -1199,6 +1200,7 @@ def PipelineStepMethod(method):
# Does the observer cares about this method?
if subscription_name in dir(observer):
+
subscription = getattr(observer, subscription_name)
# Call subscription
@@ -1206,6 +1208,7 @@ def PipelineStepMethod(method):
# Raise timestamped exception
if exception is not None:
+
raise TimestampedException(exception, timestamp)
return result