Set default status to 200 (e.g. when loaded from a local file).
authorW. Trevor King <wking@tremily.us>
Fri, 5 Oct 2012 01:08:50 +0000 (21:08 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 5 Oct 2012 01:09:54 +0000 (21:09 -0400)
rss2email.py

index 7fb39d1fec0cca0ca718716c4ab7858d16381924..7cee10da62d4b44e63390347c6855d42ccaa5024 100755 (executable)
@@ -813,7 +813,7 @@ class Feed (object):
 
     def _check_for_errors(self, parsed):
         warned = False
-        status = parsed.status
+        status = getattr(parsed, 'status', 200)
         LOG.debug('HTTP status {}'.format(status))
         if status == 301:
             LOG.info('redirect {} from {} to {}'.format(