mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-01-25 18:41:56 +01:00
RyuApp: delete a key without handlers when unregistering a handler
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
92ef0bdbb5
commit
d3f8f4eb4c
@ -169,6 +169,8 @@ class RyuApp(object):
|
||||
def unregister_handler(self, ev_cls, handler):
|
||||
assert callable(handler)
|
||||
self.event_handlers[ev_cls].remove(handler)
|
||||
if not event_handlers[ev_cls]:
|
||||
del event_handlers[ev_cls]
|
||||
|
||||
def register_observer(self, ev_cls, name, states=None):
|
||||
states = states or set()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user