fix return of None in 2.4

This commit is contained in:
Marcos Pinto 2008-04-08 06:39:57 +00:00
parent 346a25564a
commit d17092b20d
1 changed files with 3 additions and 2 deletions

View File

@ -362,9 +362,10 @@ class TorrentView(listview.ListView, component.Component):
"""Returns a torrent_id or None. If multiple torrents are selected, """Returns a torrent_id or None. If multiple torrents are selected,
it will return the torrent_id of the first one.""" it will return the torrent_id of the first one."""
selected = self.get_selected_torrents() selected = self.get_selected_torrents()
if selected == None: if selected:
return selected
return selected[0] return selected[0]
else:
return selected
def get_selected_torrents(self): def get_selected_torrents(self):
"""Returns a list of selected torrents or None""" """Returns a list of selected torrents or None"""