X-Git-Url: https://harishankar.org/repos/?p=biaweb_qt.git;a=blobdiff_plain;f=main_window.py;fp=main_window.py;h=57762afd9a9f12c64c28b455986044a88cc15351;hp=799fdf8b02d10a6b317fc82f03e97131fc390b68;hb=1e98086e7040991b7aa6904fbac30f256a84f299;hpb=cd074c8da38f6cc0ad808783ca7e631967dfdd47 diff --git a/main_window.py b/main_window.py index 799fdf8..57762af 100644 --- a/main_window.py +++ b/main_window.py @@ -23,7 +23,7 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): recs = biaweb_db.get_categories (self.current_db) # check with False because None is returned when no records exist - if recs == False: + if recs is False: PyQt4.QtGui.QMessageBox.critical (self, "Error", "SQLite 3 error in getting the categories") return False @@ -40,7 +40,7 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): recs = biaweb_db.get_articles (self.current_db, catid) # check with False because None is returned when no records exist - if recs == False: + if recs is False: PyQt4.QtGui.QMessageBox.critical (self, "Error", "SQLite 3 error in getting the articles") return False @@ -342,7 +342,7 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): loaded_arts = self.repopulate_articles () # if failed in loading either categories or articles (note: checking against # False and not None) - if loaded_cats == False or loaded_arts == False: + if loaded_cats is False or loaded_arts is False: self.current_db = None PyQt4.QtGui.QMessageBox.critical (self, "Error", "SQLite 3 error in loading site database. This appears to be an invalid BiaWeb database")