fix crash when ID is invalid

This commit is contained in:
Romain Bignon 2011-07-05 16:21:15 +02:00
commit 3b87d4aaf8

View file

@ -60,6 +60,8 @@ class GazelleBrowser(BaseBrowser):
return self.page.iter_torrents()
def get_torrent(self, fullid):
if not '.' in fullid:
return None
id, torrentid = fullid.split('.', 1)
self.location(self.buildurl('/torrents.php', id=id, torrentid=torrentid))