Fixed import into threads.py. Corrected typos
This commit is contained in:
@@ -52,7 +52,7 @@ class DownloadWindow(QWidget, Ui_Download_window):
|
|||||||
"""Start the download thread."""
|
"""Start the download thread."""
|
||||||
self._download_thread.start()
|
self._download_thread.start()
|
||||||
|
|
||||||
def _downlaod_format_str(self, n):
|
def _download_format_str(self, n):
|
||||||
"""Return a well-formatted string with the downloaded MB."""
|
"""Return a well-formatted string with the downloaded MB."""
|
||||||
return f"Downloaded: {n} MB"
|
return f"Downloaded: {n} MB"
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ class DownloadWindow(QWidget, Ui_Download_window):
|
|||||||
def _display_progress(self, progress):
|
def _display_progress(self, progress):
|
||||||
"""Display the downloaded MB."""
|
"""Display the downloaded MB."""
|
||||||
if progress != Constants.EXTRACTING_CODE:
|
if progress != Constants.EXTRACTING_CODE:
|
||||||
self.status_lbl.setText(self._downlaod_format_str(progress))
|
self.status_lbl.setText(self._download_format_str(progress))
|
||||||
elif progress == Constants.EXTRACTING_CODE:
|
elif progress == Constants.EXTRACTING_CODE:
|
||||||
self.status_lbl.setText(Constants.EXTRACTING_MSG)
|
self.status_lbl.setText(Constants.EXTRACTING_MSG)
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ from PyQt5.QtCore import QThread, pyqtSignal
|
|||||||
from constants import Constants, Database, ChecksumWhat
|
from constants import Constants, Database, ChecksumWhat
|
||||||
from utilities import checksum_ok
|
from utilities import checksum_ok
|
||||||
|
|
||||||
|
import encodings.idna
|
||||||
|
|
||||||
class ThreadStatus(Enum):
|
class ThreadStatus(Enum):
|
||||||
"""Possible thread status."""
|
"""Possible thread status."""
|
||||||
@@ -159,7 +160,7 @@ class _AsyncDownloader:
|
|||||||
|
|
||||||
|
|
||||||
class UpdateSpaceWeatherThread(BaseDownloadThread, _AsyncDownloader):
|
class UpdateSpaceWeatherThread(BaseDownloadThread, _AsyncDownloader):
|
||||||
"""Subclass BaseDownloadThread. Downlaod the space weather data."""
|
"""Subclass BaseDownloadThread. Download the space weather data."""
|
||||||
|
|
||||||
_PROPERTIES = ("xray", "prot_el", "ak_index", "sgas", "geo_storm")
|
_PROPERTIES = ("xray", "prot_el", "ak_index", "sgas", "geo_storm")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user