From ed80f8439f4a4f198f0e127b5301494bee227f6f Mon Sep 17 00:00:00 2001 From: Lindsey Smith Date: Thu, 17 Feb 2011 17:22:32 -0800 Subject: [PATCH] Fixes for feedparser v5.0 --- rss2email.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.26.2