summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/base/app_manager.py4
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()