Fix comparisons to None

This commit is contained in:
Laurent Bachelier 2013-04-03 19:03:56 +02:00
commit 77ed563581

View file

@ -411,16 +411,16 @@ class MainWindow(QtMainWindow):
def newTab(self, txt, backend, person=None, movie=None, torrent=None, subtitle=None):
id = ''
if person != None:
if person is not None:
id = person.id
stype = 'person'
elif movie != None:
elif movie is not None:
id = movie.id
stype = 'movie'
elif subtitle != None:
elif subtitle is not None:
id = subtitle.id
stype = 'subtitle'
elif torrent != None:
elif torrent is not None:
id = torrent.id
stype = 'torrent'
new_res = Result(self.weboob, self.app, self)