From f7338ff62e6d0a8dd58adc45c9a9f1310d27ec69 Mon Sep 17 00:00:00 2001 From: Shettland Date: Tue, 16 Jul 2024 11:58:16 +0200 Subject: [PATCH] Better remote cleaning. Fix1 --- relecov_tools/sftp_handle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/relecov_tools/sftp_handle.py b/relecov_tools/sftp_handle.py index 0160fb17..db9a4b03 100755 --- a/relecov_tools/sftp_handle.py +++ b/relecov_tools/sftp_handle.py @@ -1321,7 +1321,8 @@ def execute_process(self): target_folders = self.select_target_folders() if self.download_option == "delete_only": log.info("Initiating delete_only process") - for folder in target_folders.keys(): + processed_folders = target_folders.keys() + for folder in processed_folders: self.current_folder = folder self.delete_remote_files(folder) self.delete_remote_folder(folder)