Add checksum control od db download and switch to urllib3

This commit is contained in:
alessandro90
2018-11-03 20:38:05 +01:00
parent e28d3b6286
commit f224fcc0bc
3 changed files with 46 additions and 8 deletions

View File

@@ -18,14 +18,23 @@ class DownloadWindow(QWidget, Ui_Download_window):
self.everything_ok = True
self.no_internet_msg = QMessageBox(self)
self.no_internet_msg.setWindowTitle("No internet connection")
self.no_internet_msg.setText("Unable to establish an internet connection")
self.no_internet_msg.setText("Unable to establish an internet connection.")
# self.no_internet_msg.buttonClicked.connect(self.close)
self.no_internet_msg.finished.connect(self.close)
self.bad_db_download_msg = QMessageBox(self)
self.bad_db_download_msg.setWindowTitle("Something wrong")
self.bad_db_download_msg.setText("""Something went wrong with the downaload.
Check your internet connection and try again.""")
self.bad_db_download_msg.finished.connect(self.close)
self.bad_file_msg = QMessageBox(self)
self.bad_file_msg.setWindowTitle("Bad file detected")
self.bad_file_msg.setText("""The downloaded file seems to be corrupted.
The old database has not been deleted and
the downloaded file has been discarded.""")
self.bad_file_msg.finished.connect(self.close)
self.download_thread = DownloadThread(db_location, data_folder)
self.download_thread.finished.connect(self.wait_close)
self.download_thread.no_connection_error.connect(self.show_no_connection_warning)