be more robust in the face of grok failures
authorDavid Ascher <david@mozillamessaging.com>
Thu, 29 Jan 2009 16:44:40 -0800
changeset 36 9e7e4a9a4a91c528b9951b097011b328e6d8fc5d
parent 35 c16b02358f0632e6904e1711b6a111f3da6ca696
child 37 2267a6169f2ae84faaadf04fa4e77cbe04ffb2b9
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
be more robust in the face of grok failures
server/python/junius/getmail.py
--- a/server/python/junius/getmail.py
+++ b/server/python/junius/getmail.py
@@ -44,17 +44,20 @@ class JuniusAccount(object):
         for row in model.Message.by_storage(self.dbs.messages, startkey=startkey, endkey=endkey).rows:
             known_uids.add(row.key[2])
         
         processed = 0
         skipped = 0
         for message in folder.messages.values():
             uid = int(message.UID)
             if uid not in known_uids:
-                self.grok_message(message)
+                try:
+                    self.grok_message(message)
+                except: 
+                    print "ERROR groking messages"
                 processed += 1
             else:
                 skipped += 1
         print '  processed', processed, 'skipped', skipped
     
     def grok_email_addresses(self, *address_strings):
         seen_contacts = {}
         result_lists = []