Fix comparisons to None

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

View file

@ -371,7 +371,7 @@ class MainWindow(QtMainWindow):
w = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_W), self) w = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_W), self)
self.connect(w, SIGNAL("activated()"), self.closeCurrentTab) self.connect(w, SIGNAL("activated()"), self.closeCurrentTab)
self.connect(self.ui.resultsTab, SIGNAL("tabCloseRequested(int)"),self.closeTab) self.connect(self.ui.resultsTab, SIGNAL("tabCloseRequested(int)"), self.closeTab)
self.loadBackendsList() self.loadBackendsList()
@ -411,16 +411,16 @@ class MainWindow(QtMainWindow):
def newTab(self, txt, backend, person=None, movie=None, torrent=None, subtitle=None): def newTab(self, txt, backend, person=None, movie=None, torrent=None, subtitle=None):
id = '' id = ''
if person != None: if person is not None:
id = person.id id = person.id
stype = 'person' stype = 'person'
elif movie != None: elif movie is not None:
id = movie.id id = movie.id
stype = 'movie' stype = 'movie'
elif subtitle != None: elif subtitle is not None:
id = subtitle.id id = subtitle.id
stype = 'subtitle' stype = 'subtitle'
elif torrent != None: elif torrent is not None:
id = torrent.id id = torrent.id
stype = 'torrent' stype = 'torrent'
new_res = Result(self.weboob, self.app, self) new_res = Result(self.weboob, self.app, self)