mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
RyuApp: allow observing events without having handlers
this will be used by ofctl app which registers handlers dynamically. when unobserving an event cls dynamically, there might be events of the cls left in app's event queue already. 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:
parent
b75cd0c0bd
commit
5b34514c99
@ -191,6 +191,9 @@ class RyuApp(object):
|
||||
return handlers
|
||||
|
||||
def test(h):
|
||||
if not ev_cls in h.callers:
|
||||
# this handler does not listen the event.
|
||||
return False
|
||||
states = h.callers[ev_cls].dispatchers
|
||||
if not states:
|
||||
# empty states means all states
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user