Commit f64738a7 authored by Jérome Perrin's avatar Jérome Perrin

RSS reader: ignore feedparser bozo about encoding

parent be552523
...@@ -29,8 +29,11 @@ def getRssDataAsDict(self, url, username=None, password=None): ...@@ -29,8 +29,11 @@ def getRssDataAsDict(self, url, username=None, password=None):
# we have an URL error # we have an URL error
return {'status':-2} return {'status':-2}
elif d.bozo: elif d.bozo:
print d.bozo, d.bozo_exception # some bozo exceptions can be ignored
return {'status': -5} if not isinstance(d.bozo_exception, (
feedparser.CharacterEncodingOverride,
)):
return {'status': -5}
if d.status == 401: if d.status == 401:
return {'status':-3} return {'status':-3}
elif d.status == 404: elif d.status == 404:
......
765 766
\ No newline at end of file \ No newline at end of file
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