Permalink
Browse files

Register event under _event_name instead of attr name.

  • Loading branch information...
1 parent 97b9438 commit ec0b4d5f9ba23679c2984347c01a0611cfca1a0b @specialunderwear specialunderwear committed Mar 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 tornadio2/conn.py
View
@@ -60,7 +60,7 @@ class EventMagicMeta(type):
def __init__(cls, name, bases, attrs):
# find events, also in bases
is_event = lambda x: ismethod(x) and hasattr(x, '_event_name')
- events = getmembers(cls, is_event)
+ events = [(e._event_name, e) for _, e in getmembers(cls, is_event)]
setattr(cls, '_events', dict(events))
# Call base

0 comments on commit ec0b4d5

Please sign in to comment.