Commit 3f74e223 authored by Yoshinori Okuji's avatar Yoshinori Okuji

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
parent 3d91df1f
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment