From 1ae05a019f26cbac0a1dcc737249e44f04e224fb Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 14 Sep 2013 09:49:56 -0700 Subject: [PATCH] feed: Give defaults for _get_entry_name formatting data We don't want to crash if the source feed is missing some data that the user expects, or if the user just hasn't had the time to adjust the name-format config. Signed-off-by: W. Trevor King --- rss2email/feed.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rss2email/feed.py b/rss2email/feed.py index 3835a45..876b9c3 100644 --- a/rss2email/feed.py +++ b/rss2email/feed.py @@ -552,7 +552,12 @@ class Feed (object): """ if not self.name_format: return '' - data = {'feed': self} + data = { + 'feed': self, + 'feed-title': '', + 'author': '', + 'publisher': '', + } feed = parsed.feed data['feed-title'] = feed.get('title', '') for x in [entry, feed]: -- 2.26.2