From: Isaku Yamahata <[email protected]> So that it can save memory a bit.
Cc: [email protected] Signed-off-by: Isaku Yamahata <[email protected]> Signed-off-by: YAMAMOTO Takashi <[email protected]> --- ryu/ofproto/ofproto_parser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ryu/ofproto/ofproto_parser.py b/ryu/ofproto/ofproto_parser.py index 8cb0402..bfb9866 100644 --- a/ryu/ofproto/ofproto_parser.py +++ b/ryu/ofproto/ofproto_parser.py @@ -58,7 +58,11 @@ def create_list_of_base_attributes(f): @functools.wraps(f) def wrapper(self, *args, **kwargs): ret = f(self, *args, **kwargs) - self._base_attributes = set(dir(self)) + cls = self.__class__ + # hasattr(cls, '_base_attributes') doesn't work because super class + # may already have the attribute. + if '_base_attributes' not in cls.__dict__: + cls._base_attributes = set(dir(self)) return ret return wrapper -- 1.8.1.5 ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
