rubys / venus

Planet Venus is an awesome ‘river of news’ feed reader. It downloads news feeds published by web sites and aggregates their content together into a single combined feed, latest news first.
http://intertwingly.net/code/venus/docs/index.html
Other
273 stars 99 forks source link

Handle varieties of empty <georss:point> element #23

Open mloskot opened 11 years ago

mloskot commented 11 years ago

Empty point defined as <georss:point> </georss:point> with single space only leads to index out of range on the coordinates access.

From the log:

ERROR:planet.runner:Error processing http://example.com/feed
ERROR:planet.runner:IndexError: list index out of range
ERROR:planet.runner:  File "/opt/venus/planet/spider.py", line 480, in spiderPlanet
    writeCache(uri, feed_info, data)
ERROR:planet.runner:  File "/opt/venus/planet/spider.py", line 228, in writeCache
    xdoc = reconstitute.reconstitute(data, entry)
ERROR:planet.runner:  File "/opt/venus/planet/reconstitute.py", line 315, in reconstitute
    location(xentry, (float)(coordinates[1]), (float)(coordinates[0]))

It looks rope-vim plugin I use with Vim automatically applied a bit of refactoring on unifying indentation. I hope it's not a showstopper :) If it is a problem, let me know and I'll prepare clean patch.