From: Lindsey Smith Date: Fri, 18 Feb 2011 01:22:32 +0000 (-0800) Subject: Fixes for feedparser v5.0 X-Git-Tag: v3.0~74^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ed80f8439f4a4f198f0e127b5301494bee227f6f;p=rss2email.git Fixes for feedparser v5.0 --- diff --git a/rss2email.py b/rss2email.py index 40b4b4d..d178bad 100644 --- a/rss2email.py +++ b/rss2email.py @@ -446,7 +446,7 @@ def getEmail(r, entry): if FORCE_FROM: return DEFAULT_FROM - if r.url in OVERRIDE_EMAIL.keys(): + if hasattr(r, "url") and r.url in OVERRIDE_EMAIL.keys(): return validateEmail(OVERRIDE_EMAIL[r.url], DEFAULT_FROM) if 'email' in entry.get('author_detail', []): @@ -462,7 +462,7 @@ def getEmail(r, entry): if feed.get("errorreportsto", ''): return validateEmail(feed.errorreportsto, DEFAULT_FROM) - if r.url in DEFAULT_EMAIL.keys(): + if hasattr(r, "url") and r.url in DEFAULT_EMAIL.keys(): return DEFAULT_EMAIL[r.url] return DEFAULT_FROM