"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "versions/common.py" between
versions-1.5.4.tar.gz and versions-1.5.5.tar.gz

About: versions checks releases and versions of your favorite programs (on the main repositories) through RSS or Atom feeds.

common.py  (versions-1.5.4):common.py  (versions-1.5.5)
skipping to change at line 120 skipping to change at line 120
print(u'Error while fetching url "{}".'.format(url)) print(u'Error while fetching url "{}".'.format(url))
# End of manage_non_http_errors() function # End of manage_non_http_errors() function
def get_feed_entries_from_url(url): def get_feed_entries_from_url(url):
""" """
Gets feed entries from an url that should be an Gets feed entries from an url that should be an
RSS or Atom feed. RSS or Atom feed.
>>> get_feed_entries_from_url("http://delhomme.org/notfound.html") >>> get_feed_entries_from_url("http://delhomme.org/notfound.html")
Error 404 while fetching "http://delhomme.org/notfound.html". Error 404 while fetching "http://delhomme.org/notfound.html".
>>> feed = get_feed_entries_from_url("http://blog.delhomme.org/index.php?fee d/atom") >>> feed = get_feed_entries_from_url("https://github.com/dupgit/versions/tag s.atom")
>>> feed.status >>> feed.status
200 200
""" """
feed = feedparser.parse(url) feed = feedparser.parse(url)
if 'status' in feed: if 'status' in feed:
feed = manage_http_status(feed, url) feed = manage_http_status(feed, url)
else: else:
# An error happened such that the feed does not contain an HTTP answer. # An error happened such that the feed does not contain an HTTP answer.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)