guid might not always exist, link is always present, don't fail on no guid.
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Fri, 12 Jun 2009 10:00:33 +0000 (11:00 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Fri, 12 Jun 2009 10:00:33 +0000 (11:00 +0100)
rss2maildir.py

index 533e34d..4ee2126 100755 (executable)
@@ -692,12 +692,13 @@ def parse_and_deliver(maildir, url, statedir):
 
         prevmessageid = None
 
-        db_guid_key = (url + u'|' + item["guid"]).encode("utf-8")
+        db_guid_key = None
         db_link_key = (url + u'|' + item["link"]).encode("utf-8")
 
         # check if there's a guid too - if that exists and we match the md5,
         # return
         if item.has_key("guid"):
+            db_guid_key = (url + u'|' + item["guid"]).encode("utf-8")
             if db.has_key(db_guid_key):
                 data = db[db_guid_key]
                 data = cgi.parse_qs(data)