To ease debugging, dropping info to dict
authorEd Page <eopage@byu.net>
Wed, 20 Jan 2010 03:05:49 +0000 (21:05 -0600)
committerEd Page <eopage@byu.net>
Wed, 20 Jan 2010 03:05:49 +0000 (21:05 -0600)
src/gvoice/conversations.py

index d0f80e9..809d0fc 100644 (file)
@@ -66,7 +66,7 @@ class Conversations(object):
                                isConversationUpdated = True
                        except RuntimeError, e:
                                if False:
                                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:
                                isConversationUpdated = False
 
                        if isConversationUpdated:
@@ -104,6 +104,11 @@ class MergedConversations(object):
                        self._remove_repeats(similarConversation, newConversation)
                self._conversations.append(newConversation)
 
                        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
        @property
        def conversations(self):
                return self._conversations