Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion locust/event.py
Original file line number Diff line number Diff line change
@@ -171,7 +171,11 @@ class Events:
"""

def __init__(self):
# For backwarde compatiblilty use also values of class attributes
for name, value in vars(type(self)).items():
value = self.__annotations__.get(name, value) == EventHook
if value == EventHook:
setattr(self, name, value())

for name, value in self.__annotations__.items():
if value == EventHook:
setattr(self, name, value())

0 comments on commit c1c3861

Please sign in to comment.