trivial modification

This commit is contained in:
Chunxiao Li 2021-06-09 15:16:15 +08:00 committed by GitHub
parent 00efec980c
commit 746959a99f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,16 +32,16 @@ def download_sw_nrlmsise00(direc=None):
if not path.exists(direc): makedirs(direc)
if not path.exists(swfile):
desc = 'Downloading the space weather data {:s} from CELESTRAK'.format('SW-All.txt')
desc = "Downloading the space weather data '{:s}' from CELESTRAK".format('SW-All.txt')
tqdm_request(url,direc,'SW-All.txt',desc)
else:
modified_time = datetime.fromtimestamp(path.getmtime(swfile))
if datetime.now() > modified_time + timedelta(days=1):
remove(swfile)
desc = 'Updating the space weather data {:s} from CELESTRAK'.format('SW-All.txt')
desc = "Updating the space weather data '{:s}' from CELESTRAK".format('SW-All.txt')
tqdm_request(url,direc,'SW-All.txt',desc)
else:
print('The space weather data {0:s} in {1:s} is already the latest.'.format('SW-All.txt',direc))
print("The space weather data '{0:s}' in {1:s} is already the latest.".format('SW-All.txt',direc))
return swfile
def read_sw_nrlmsise00(swfile):