Skip to content

Commit

Permalink
get: Fix badly named variables in Exception handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
wwood committed Jan 11, 2024
1 parent 0fa302f commit 20e8e98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kingfisher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def download_and_extract_one_run(run_identifier, **kwargs):
logging.warning("Method {} failed: Error was: {}".format(method, e))
if os.path.exists(output_path):
logging.info("Removing file {} because download failed ..".format(output_path))
os.remove(f)
os.remove(output_path)

elif method == 'aws-http':
def download_from_aws(odp_link, run_identifier, download_threads, method):
Expand Down Expand Up @@ -268,12 +268,12 @@ def download_from_aws(odp_link, run_identifier, download_threads, method):
))
if os.path.exists(output_path):
logging.info("Removing file {} because download failed ..".format(output_path))
os.remove(f)
os.remove(output_path)
else:
logging.warning("Method {} failed: No S3 location could be found".format(method))
if os.path.exists(output_path):
logging.info("Removing file {} because download failed ..".format(output_path))
os.remove(f)
os.remove(output_path)

elif method == 'gcp-cp':
output_path = output_location_factory.output_stem('{}.sra'.format(run_identifier))
Expand Down Expand Up @@ -327,7 +327,7 @@ def download_from_aws(odp_link, run_identifier, download_threads, method):
))
if os.path.exists(output_path):
logging.info("Removing file {} because download failed ..".format(output_path))
os.remove(f)
os.remove(output_path)
else:
logging.warning("Method {} failed: No GCP location could be found".format(method))
else:
Expand Down

0 comments on commit 20e8e98

Please sign in to comment.