By checking the contents first, we'd get an exception before
we got to the status check, and thus generate an incorrect message
try:
feed = feedparser.parse(feedurl)
status = feed.status
+ if not status == 200:
+ raise pExcept('Attempt to download blog feed returned status %s.' % (status))
lnk = feed.feed.link
l = len(feed.entries)
if l < 1:
raise
except Exception, e:
raise pExcept('Failed to download blog feed: %s' % e)
- if not status == 200:
- raise pExcept('Attempt to download blog feed returned status %s.' % (status))
if not settings.NOTIFYADDR:
raise pExcept('Notify address not specified, cannot complete')