To ease debugging, dropping info to dict
[theonering] / src / gvoice / conversations.py
index d0f80e9..809d0fc 100644 (file)
@@ -66,7 +66,7 @@ class Conversations(object):
                                isConversationUpdated = True
                        except RuntimeError, e:
                                if False:
-                                       _moduleLogger.info("%s Skipping conversation for %r because '%s'" % (self._name, key, e))
+                                       _moduleLogger.debug("%s Skipping conversation for %r because '%s'" % (self._name, key, e))
                                isConversationUpdated = False
 
                        if isConversationUpdated:
@@ -104,6 +104,11 @@ class MergedConversations(object):
                        self._remove_repeats(similarConversation, newConversation)
                self._conversations.append(newConversation)
 
+       def to_dict(self):
+               selfDict = {}
+               selfDict["conversations"] = [conv.to_dict() for conv in self._conversations]
+               return selfDict
+
        @property
        def conversations(self):
                return self._conversations