Make sure event_names returns *all* events

This commit is contained in:
Joseph Schorr 2017-07-14 16:52:52 +03:00
parent 875a303762
commit b1d5990ab3

View file

@ -70,7 +70,10 @@ class NotificationEvent(object):
@classmethod
def event_names(cls):
for subc in cls.__subclasses__():
if subc.event_name() is not None:
if subc.event_name() is None:
for subsubc in subc.__subclasses__():
yield subsubc.event_name()
else:
yield subc.event_name()
@staticmethod