Fixed import into threads.py. Corrected typos

This commit is contained in:
Marco
2019-07-03 10:02:07 +02:00
parent 69a50b0664
commit 27b5341173
2 changed files with 4 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ class DownloadWindow(QWidget, Ui_Download_window):
"""Start the download thread."""
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 f"Downloaded: {n} MB"
@@ -74,7 +74,7 @@ class DownloadWindow(QWidget, Ui_Download_window):
def _display_progress(self, progress):
"""Display the downloaded MB."""
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:
self.status_lbl.setText(Constants.EXTRACTING_MSG)

View File

@@ -12,6 +12,7 @@ from PyQt5.QtCore import QThread, pyqtSignal
from constants import Constants, Database, ChecksumWhat
from utilities import checksum_ok
import encodings.idna
class ThreadStatus(Enum):
"""Possible thread status."""
@@ -159,7 +160,7 @@ class _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")