diff --git a/product/CMFActivity/ActivityBuffer.py b/product/CMFActivity/ActivityBuffer.py
index f682b13288aad7eca07df4ce88a8a8c9744fd6db..7defffd91754ee65be1bdd86b8ae7db034b8faf3 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()