On Fri, 22 Nov 2013 16:45:56 +0900
YAMAMOTO Takashi <[email protected]> wrote:

> From: Isaku Yamahata <[email protected]>
> 
> The class used for context might be RyuApp. So methods of RyuApp needs
> to be called.
> 
> Reported-by: YAMADA Hideki <[email protected]>
> Signed-off-by: Isaku Yamahata <[email protected]>
> Signed-off-by: YAMAMOTO Takashi <[email protected]>
> ---
>  ryu/base/app_manager.py | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py
> index a5f1c4c..3e40daa 100644
> --- a/ryu/base/app_manager.py
> +++ b/ryu/base/app_manager.py
> @@ -187,13 +187,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)

_instantiate() is added in the third patch in this patchset. This
patch must be after the third one.


> +            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 instantiate_apps(self, *args, **kwargs):
> -- 
> 1.8.3.1
> 
> 
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing 
> conversations that shape the rapidly evolving mobile landscape. Sign up now. 
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to