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 f6441ac..a9895a2 100644
--- a/ryu/base/app_manager.py
+++ b/ryu/base/app_manager.py
@@ -35,6 +35,8 @@ def lookup_service_brick(name):
 
 
 def register_app(app):
+    assert isinstance(app, RyuApp)
+    assert not app.name in SERVICE_BRICKS
     SERVICE_BRICKS[app.name] = app
     register_instance(app)
 
@@ -146,6 +148,8 @@ class AppManager(object):
     def create_contexts(self):
         for key, cls in self.contexts_cls.items():
             context = cls()
+            LOG.info('creating context %s', key)
+            assert not key in self.contexts
             self.contexts[key] = context
             # hack for dpset
             if context.__class__.__base__ == RyuApp:
-- 
1.7.12


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to