From: Brett Parker Date: Sat, 7 Jun 2008 11:59:47 +0000 (+0100) Subject: Fix for items that actually have no content. X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/commitdiff_plain/88b4ead7d0ce70bb35bc27a49225bfca23354185 Fix for items that actually have no content. --- diff --git a/rss2maildir.py b/rss2maildir.py index bbd9b1b..b77c6d7 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -683,7 +683,10 @@ def parse_and_deliver(maildir, url, statedir): if item.has_key("content"): content = item["content"][0]["value"] else: - content = item["description"] + if item.has_key("description"): + content = item["description"] + else: + content = u'' md5sum = md5.md5(content.encode("utf-8")).hexdigest()