From 9630b4050b1fadb0e5c3f4525c47fedd232f64b3 Mon Sep 17 00:00:00 2001 From: Dave McKay Date: Wed, 23 Oct 2024 10:42:31 +0100 Subject: [PATCH] no need for continue --- csd3-side/scripts/lsst-backup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/csd3-side/scripts/lsst-backup.py b/csd3-side/scripts/lsst-backup.py index 74d89a5..e0679f7 100644 --- a/csd3-side/scripts/lsst-backup.py +++ b/csd3-side/scripts/lsst-backup.py @@ -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)