don't care if no table is found (it means that there is no result)

This commit is contained in:
Romain Bignon 2010-05-02 19:24:49 +02:00
commit 24276ff868

View file

@ -48,9 +48,7 @@ class TorrentsPage(BasePage):
table = self.document.getroot().cssselect('table.torrent_table') table = self.document.getroot().cssselect('table.torrent_table')
if not table: if not table:
table = self.document.getroot().cssselect('table#browse_torrent_table') table = self.document.getroot().cssselect('table#browse_torrent_table')
if not table: if table:
warning('No table found')
else:
table = table[0] table = table[0]
current_group = None current_group = None
for tr in table.findall('tr'): for tr in table.findall('tr'):