Minor refactoring

This commit is contained in:
alessandro90
2019-04-26 10:37:06 +02:00
parent 00ae41f584
commit f45d36dc6d
5 changed files with 56 additions and 56 deletions

View File

@@ -606,7 +606,7 @@ class Artemis(QMainWindow, Ui_MainWindow):
query += self.gfd_line_edit.text()
try:
webbrowser.open(Constants.GFD_SITE + query.lower())
except:
except Exception:
pass
@pyqtSlot(QListWidgetItem)
@@ -713,12 +713,12 @@ class Artemis(QMainWindow, Ui_MainWindow):
try:
with open(db_path, "rb") as file_db:
db = file_db.read()
except:
except Exception:
self.download_db()
else:
try:
is_checksum_ok = checksum_ok(db, ChecksumWhat.DB)
except:
except Exception:
pop_up(self, title = Messages.NO_CONNECTION,
text = Messages.NO_CONNECTION_MSG).show()
else:
@@ -741,7 +741,7 @@ class Artemis(QMainWindow, Ui_MainWindow):
try:
with open(db_path, "rb") as file_db:
db = file_db.read()
except:
except Exception:
answer = pop_up(self, title = Messages.NO_DB,
text = Messages.NO_DB_AVAIL,
informative_text = Messages.DOWNLOAD_NOW_QUESTION,
@@ -751,7 +751,7 @@ class Artemis(QMainWindow, Ui_MainWindow):
else:
try:
is_checksum_ok = checksum_ok(db, ChecksumWhat.DB)
except:
except Exception:
pop_up(self, title = Messages.NO_CONNECTION,
text = Messages.NO_CONNECTION_MSG).show()
else: