Commit 531888b1 authored by Nicolas Wavrant's avatar Nicolas Wavrant

checkfeedaspromise: makes error messages more verbose

parent c8e33cf1
...@@ -41,7 +41,10 @@ def checkFeedAsPromise(feed, option): ...@@ -41,7 +41,10 @@ def checkFeedAsPromise(feed, option):
feed = feedparser.parse(feed) feed = feedparser.parse(feed)
if feed.bozo: if feed.bozo:
return 'Feed malformed' return 'Feed malformed : %s (at line %s)' % (
feed.bozo_exception.getMessage(),
feed.bozo_exception.getLineNumber(),
)
if len(feed.entries) == 0: if len(feed.entries) == 0:
return '' return ''
...@@ -77,7 +80,7 @@ def checkFeedAsPromise(feed, option): ...@@ -77,7 +80,7 @@ def checkFeedAsPromise(feed, option):
return '' return ''
else: else:
# If time-buffer is out, we are in stalled state # If time-buffer is out, we are in stalled state
return 'Stalled situation' return 'Stalled situation : Nothing happened since %s' % publication_date
# If not ok, and not stalled, what can have possibly happen ? # If not ok, and not stalled, what can have possibly happen ?
return 'Something went wrong' return 'Something went wrong'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment