From 3f74e2238412814f8f7a417fb2b23918c08869f7 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Fri, 2 Mar 2007 16:37:14 +0000 Subject: [PATCH] Make sure that attributes are present in _getBuffer instead of __init__. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13192 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/CMFActivity/ActivityBuffer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/product/CMFActivity/ActivityBuffer.py b/product/CMFActivity/ActivityBuffer.py index f682b13288..7defffd917 100644 --- a/product/CMFActivity/ActivityBuffer.py +++ b/product/CMFActivity/ActivityBuffer.py @@ -70,16 +70,15 @@ class ActivityBuffer(TM): finally: buffer_dict_lock.release() + def _getBuffer(self): + buffer = buffer_dict[self._activity_tool_path] # Create attributes only if they are not present. - buffer = self._getBuffer() if not hasattr(buffer, 'queued_activity'): buffer.queued_activity = [] buffer.flushed_activity = [] buffer.message_list_dict = {} buffer.uid_set_dict = {} - - def _getBuffer(self): - return buffer_dict[self._activity_tool_path] + return buffer def _clearBuffer(self): buffer = self._getBuffer() -- 2.30.9