What steps will reproduce the problem?
1. Pass include_feed a non existing URL as first parameter (URL of the feed
to parse)
What is the expected output? What do you see instead?
I would expect the template to use for rendering the results into HTML
simply gets an empty "items" value so we can handle cases when RSS feed is
unreachable:
{% if items %}
... render RSS feed ...
{% else %}
--- a fallback in case feed is unreachable ...
{% endif %}
Instead, an exception is raised:
Caught an exception while rendering: list index out of range
Original Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/django/template/debug.py",
line 71, in render_node
result = node.render(context)
File "/usr/home/django/django_apps/template_utils/templatetags/feeds.py",
line 30, in render
pub_date = feed['entries'][i].updated_parsed
IndexError: list index out of range
What version of the product are you using? On what operating system?
Revision 109 on FreeBSD 7.0-RELEASE
Django is updated from SVN on 2008 Aug 30
Please provide any additional information below.
Maybe I'm doing something wrong, but since I include an RSS feed with this
library in every page of my site, if the feed is unreachable, every page of
my site will raise an exception.
The attached patch works for me; it IS NOT A SOLUTION but simply a dirty
workaround to help better describe the issue.
Original issue reported on code.google.com by a...@netsail.it on 1 Sep 2008 at 2:10
Original issue reported on code.google.com by
a...@netsail.it
on 1 Sep 2008 at 2:10Attachments: