Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def download_all_files(self):
"""Downloads the files according to the attributes of this object."""
result = True
try:
download_IERS_A()
except Exception as e:
if not self.keep_going:
raise e
print('Failed to download IERS A bulletin: {}'.format(e))
result = False
if self.wide_field:
for i in range(4110, 4119):
if not self.download_one_file('4100/index-{}.fits'.format(i)):
result = False
if self.narrow_field:
for i in range(4210, 4219):
if not self.download_one_file('4200/index-{}.fits'.format(i)):
result = False
return result
def download_all_files(self):
"""Downloads the files according to the attributes of this object."""
result = True
try:
download_IERS_A()
except Exception as e:
if not self.keep_going:
raise e
print('Failed to download IERS A bulletin: {}'.format(e))
result = False
if self.wide_field:
for i in range(4110, 4119):
if not self.download_one_file('4100/index-{}.fits'.format(i)):
result = False
if self.narrow_field:
for i in range(4210, 4219):
if not self.download_one_file('4200/index-{}.fits'.format(i)):
result = False
return result