Skip to content

Commit d611927

Browse files
committed
Fix show download progress
1 parent a705c5c commit d611927

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sbpy/dastcom5/dastcom5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,13 +531,13 @@ def download_dastcom5():
531531
urllib.request.urlretrieve(
532532
FTP_DB_URL + "dastcom5.zip",
533533
dastcom5_zip_path,
534-
_show_download_progress
534+
show_download_progress
535535
)
536536
with zipfile.ZipFile(dastcom5_zip_path) as myzip:
537537
myzip.extractall(SBPY_LOCAL_PATH)
538538

539539

540-
def _show_download_progress(transferred, block, totalsize):
540+
def show_download_progress(transferred, block, totalsize):
541541
trans_mb = transferred * block / (1024 * 1024)
542542
total_mb = totalsize / (1024 * 1024)
543543
print("%.2f MB / %.2f MB" % (trans_mb, total_mb), end="\r", flush=True)

sbpy/dastcom5/tests/test_dastcom5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ def test_download_dastcom5_downloads_file(
100100
dastcom5.download_dastcom5()
101101
mock_request.assert_called_once_with(
102102
dastcom5.FTP_DB_URL + "dastcom5.zip",
103-
os.path.join(dastcom5.POLIASTRO_LOCAL_PATH, "dastcom5.zip"),
104-
dastcom5._show_download_progress,
103+
os.path.join(dastcom5.SBPY_LOCAL_PATH, "dastcom5.zip"),
104+
dastcom5.show_download_progress,
105105
)

0 commit comments

Comments
 (0)