controller/handler: allow set_ev_handler without dispatchers

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
YAMAMOTO Takashi 2013-02-08 12:28:15 +09:00 committed by FUJITA Tomonori
parent 4b8a4fc870
commit b869748e4b

View File

@ -38,7 +38,7 @@ def set_ev_cls(ev_cls, dispatchers=None):
return _set_ev_cls_dec return _set_ev_cls_dec
def set_ev_handler(ev_cls, dispatchers): def set_ev_handler(ev_cls, dispatchers=None):
def _set_ev_cls_dec(handler): def _set_ev_cls_dec(handler):
handler.ev_cls = ev_cls handler.ev_cls = ev_cls
handler.dispatchers = _listify(dispatchers) handler.dispatchers = _listify(dispatchers)