Skip to content

Commit

Permalink
Only replace if the file doesn't already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed May 21, 2024
1 parent 4f93dc5 commit 2db803d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ramjet/data_interface/tess_data_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ def download_spoc_light_curves_for_tic_ids_chunk(
if manifest_row["Status"] == "COMPLETE":
original_file_path = Path(manifest_row["Local Path"])
updated_file_path = download_directory.joinpath(original_file_path.name)
updated_file_path.unlink(missing_ok=True)
original_file_path.rename(updated_file_path)
if not updated_file_path.exists():
original_file_path.rename(updated_file_path)
light_curve_paths.append(updated_file_path)
else:
error_message = (
Expand Down

0 comments on commit 2db803d

Please sign in to comment.