Skip to content

Commit

Permalink
sorting csv_files
Browse files Browse the repository at this point in the history
  • Loading branch information
davedavemckay committed Jul 1, 2024
1 parent 9bdef1d commit 38b5974
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/compare_csv_file_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ def compare_csv_file_lists(log_folder):
"""
csv_files = []
for filename in os.listdir(log_folder):
print(filename)
ds = '{{ ds_nodash }}'
if filename.startswith("lsst-backup-logs-") and filename.endswith(".csv") and filename.__contains__(ds):
csv_files.append(filename.replace("lsst-backup-logs-" + ds + "T", "").replace(".csv", ""))
print(filename,ds)
if filename.startswith("lsst-backup-logs-"):
if filename.endswith(".csv"):
if filename.__contains__(ds):
csv_files.append(filename)
csv_files.sort()
csv_files = csv_files[-2:]

Expand Down

0 comments on commit 38b5974

Please sign in to comment.