Commit c230f5c4 authored by Philipp Hörist's avatar Philipp Hörist

Consider private variables for @event_filter

parent 837e9a1a
......@@ -1471,8 +1471,12 @@ def event_filter(filter_):
@wraps(func)
def func_wrapper(self, event, *args, **kwargs):
for attr in filter_:
if getattr(event, attr) != getattr(self, attr):
return
try:
if getattr(event, attr) != getattr(self, attr):
return
except AttributeError:
if getattr(event, attr) != getattr(self, '_%s' % attr):
return
return func(self, event, *args, **kwargs)
return func_wrapper
return event_filter_decorator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment