# HG changeset patch # User Malcolm Matalka # Date 1700230927 14400 # Fri Nov 17 10:22:07 2023 -0400 # Node ID 4af44d8d20931107dbc4dc3004acd6b45355a8cc # Parent bf26708aa38b18914e6f71f30c74a8c5c3e1ebd3 FIX Don't fail if post doesn't have a description diff --git a/feed2maildir/converter.py b/feed2maildir/converter.py --- a/feed2maildir/converter.py +++ b/feed2maildir/converter.py @@ -196,13 +196,16 @@ desc = '' content_type = 'text/plain' if not self.links: - if self.strip: - stripper = HTMLStripper() - stripper.feed(post.description) - desc = stripper.get_data() - else: - desc = post.description - content_type = 'text/html' + try: + if self.strip: + stripper = HTMLStripper() + stripper.feed(post.description) + desc = stripper.get_data() + else: + desc = post.description + content_type = 'text/html' + except AttributeError: + desc = 'Unknown' return self.TEMPLATE.format(updated, post.title, title.lower().replace(' ', '-'),