diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2014-06-05 15:13:42 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-10 21:11:46 +0900 |
commit | ed25eefa846e2f8b7a6683908f224efc2bc0acc9 (patch) | |
tree | f4c70f0e469f595f56d36eba18661db868001b1b | |
parent | 5be7310ce21d95324d5f536b5cbb6adbe7f3425d (diff) |
app_manager: Fix a crash in unregister_handler
This fixes a regression introduced by commit d3f8f4eb.
("RyuApp: delete a key without handlers when unregistering a handler")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/base/app_manager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py index 25b043aa..f6d01475 100644 --- a/ryu/base/app_manager.py +++ b/ryu/base/app_manager.py @@ -178,8 +178,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] + if not self.event_handlers[ev_cls]: + del self.event_handlers[ev_cls] def register_observer(self, ev_cls, name, states=None): states = states or set() |