Skip to content

Commit

Permalink
no need for continue
Browse files Browse the repository at this point in the history
  • Loading branch information
davedavemckay committed Oct 23, 2024
1 parent 3402014 commit 9630b40
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions csd3-side/scripts/lsst-backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,15 +1009,11 @@ def process_files(s3_host, access_key, secret_key, bucket_name, current_objects,
for i in range(len(to_collate['object_names'])):
# print(zip_object_names)
cmp = [x.replace(destination_dir+'/', '') for x in to_collate.iloc[i]['object_names']]
print(cmp)
print(current_objects['METADATA'])
if current_objects['METADATA'].isin([cmp]).any():
print('in if')
existing_zip_contents = current_objects[current_objects['METADATA'].isin([cmp])]['METADATA'].values[0]
if all([x in existing_zip_contents for x in cmp]):
print(f'Zip file {destination_dir}/collated_{i+1}.zip from {collate_list_file} already exists and file lists match - skipping.')
droplist.append(i)
continue
else:
print(f'Zip file {destination_dir}/collated_{i+1}.zip from {collate_list_file} already exists but file lists do not match - reuploading.')
to_collate.drop(droplist, inplace=True)
Expand Down

0 comments on commit 9630b40

Please sign in to comment.