Skip to content

Commit

Permalink
be robust toward presence of absence of trailing /
Browse files Browse the repository at this point in the history
  • Loading branch information
ehneilsen committed Jan 18, 2024
1 parent 0e1e46c commit 1d93cd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rubin_scheduler/sim_archive/sim_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def transfer_archive_dir(archive_dir, archive_base_uri="s3://rubin-scheduler-pre
if base_dir == insert_date_rpath:
for found_dir in found_dirs:
try:
found_ids.append(int(found_dir[:-1]))
found_dir_index = found_dir[:-1] if found_dir.endswith("/") else found_dir
found_ids.append(int(found_dir_index))

Check warning on line 263 in rubin_scheduler/sim_archive/sim_archive.py

View check run for this annotation

Codecov / codecov/patch

rubin_scheduler/sim_archive/sim_archive.py#L262-L263

Added lines #L262 - L263 were not covered by tests
except ValueError:
pass

Expand Down

0 comments on commit 1d93cd4

Please sign in to comment.