]> git.sommitrealweird.co.uk Git - rss2maildir.git/commitdiff
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 533e34d614c810bda43514a118f1677dcfaffe4f..4ee21260685f23e48a7ff072fd78df7dda3d814e 100755 (executable)
@@ -692,12 +692,13 @@ def parse_and_deliver(maildir, url, statedir):
 
         prevmessageid = None
 
 
         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_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)
             if db.has_key(db_guid_key):
                 data = db[db_guid_key]
                 data = cgi.parse_qs(data)