this method undos register_handler.
Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/base/app_manager.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py
index 291c0ad..ec42f97 100644
--- a/ryu/base/app_manager.py
+++ b/ryu/base/app_manager.py
@@ -158,6 +158,10 @@ class RyuApp(object):
self.event_handlers.setdefault(ev_cls, [])
self.event_handlers[ev_cls].append(handler)
+ def unregister_handler(self, ev_cls, handler):
+ assert callable(handler)
+ self.event_handlers[ev_cls].remove(handler)
+
def register_observer(self, ev_cls, name, states=None):
states = states or set()
ev_cls_observers = self.observers.setdefault(ev_cls, {})
--
1.8.3.1
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel