Skip to content
Snippets Groups Projects
Commit 0c9db262 authored by Adrian Tschira's avatar Adrian Tschira
Browse files

add comment explaining attributeerror

parent bfc2ade9
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,9 @@ class _EventInternalMetadata(object):
def _event_dict_property(key):
# We want to be able to use hasattr with the event dict properties.
# However, (on python3) hasattr expects AttributeError to be raised. Hence,
# we need to transform the KeyError into an AttributeError
def getter(self):
try:
return self._event_dict[key]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment