minor modification

This commit is contained in:
Chunxiao Li 2020-07-22 11:56:39 +08:00
parent ae430dbd25
commit d741e3d8b5
3 changed files with 2 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
pyatmos/.DS_Store vendored

Binary file not shown.

View File

@ -61,7 +61,7 @@ def download_sw(direc=None):
bar_format = "{l_bar}%s{bar}%s{r_bar}" % (Fore.BLUE, Fore.RESET)
if not path.exists(swfile):
desc = 'Downloading the latest space weather data from CELESTRAK'
with TqdmUpTo(unit='B', unit_scale=True, desc=desc,bar_format = bar_format) as t:
with TqdmUpTo(unit='B', unit_scale=True, desc=desc,bar_format = bar_format,position=0) as t:
urlretrieve(url, swfile,reporthook=t.update_to)
t.total = t.n
@ -70,7 +70,7 @@ def download_sw(direc=None):
if datetime.now() > modified_time + timedelta(days=1):
remove(swfile)
desc = 'Updating the space weather data from CELESTRAK'
with TqdmUpTo(unit='B', unit_scale=True, desc=desc,bar_format = bar_format) as t:
with TqdmUpTo(unit='B', unit_scale=True, desc=desc,bar_format = bar_format,position=0) as t:
urlretrieve(url, swfile,reporthook=t.update_to)
t.total = t.n
else: