diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py index 1cd7e9f6..99dde027 100644 --- a/ryu/base/app_manager.py +++ b/ryu/base/app_manager.py @@ -227,13 +227,14 @@ class AppManager(object): def create_contexts(self): for key, cls in self.contexts_cls.items(): - context = cls() + if issubclass(cls, RyuApp): + # hack for dpset + context = self._instantiate(None, cls) + else: + context = cls() LOG.info('creating context %s', key) assert not key in self.contexts self.contexts[key] = context - # hack for dpset - if issubclass(context.__class__, RyuApp): - register_app(context) return self.contexts def _update_bricks(self):