correct behavior when listing unfetched feeds

This commit is contained in:
Ronald Schaten 2013-04-03 23:42:08 +02:00
parent 372a43f85b
commit b30ba9a9a8

View File

@ -221,9 +221,13 @@ def list_all_feeds(session):
totalentries = 0 totalentries = 0
for feed in allfeeds: for feed in allfeeds:
id = feed.id id = feed.id
title = feed.feedinfo.title if feed.feedinfo:
title = feed.feedinfo.title
last = feed.feedinfo.lastsuccessful
else:
title = '<unknown>'
last = '<never>'
entries = len(feed.entry) entries = len(feed.entry)
last = feed.feedinfo.lastsuccessful
url = feed.url url = feed.url
print '%3d %s (%d entries, last fetched %s)\n %s' % (id, title, entries, last, url) print '%3d %s (%d entries, last fetched %s)\n %s' % (id, title, entries, last, url)
totalfeeds += 1 totalfeeds += 1