feed: fix Feed._get_entry_content unpacking in Feed._get_entry_id
authorW. Trevor King <wking@tremily.us>
Mon, 10 Dec 2012 23:21:34 +0000 (18:21 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 11 Dec 2012 01:05:53 +0000 (20:05 -0500)
_get_entry_content returns a single dict, but _get_entry_id had been
unpacking it as if it was a length-two tuple.

Signed-off-by: W. Trevor King <wking@tremily.us>
rss2email/feed.py

index 2ec3e7dc859d53831b2bcb8471a421399e059f60..d7bd74fb4e3675df5d2cb1bfefebb56a57904e75 100644 (file)
@@ -433,8 +433,8 @@ class Feed (object):
                 if isinstance(entry.id, dict):
                     return entry.id.values()[0]
                 return entry.id
-        content_type,content_value = self._get_entry_content(entry)
-        content_value = content_value.strip()
+        content = self._get_entry_content(entry)
+        content_value = content['value'].strip()
         if content_value:
             return hash(content_value.encode('unicode-escape')).hexdigest()
         elif getattr(entry, 'link', None):