From dab4c8ff69969f1a7b12045a9ce8fbb21b1c450c Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Wed, 4 Jan 2023 03:10:28 +0100 Subject: [PATCH] Modify `removeChannelsBeingTreated.py` to be more resilient against not existing files in the treatment process --- removeChannelsBeingTreated.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/removeChannelsBeingTreated.py b/removeChannelsBeingTreated.py index 7dcb8bf..9f1df53 100644 --- a/removeChannelsBeingTreated.py +++ b/removeChannelsBeingTreated.py @@ -18,6 +18,8 @@ with open('nohup.out') as f: for threadId in threads: channelId = threads[threadId] print(threadId, channelId) - shutil.rmtree(path + channelId) - - + try: + shutil.rmtree(path + channelId) + os.remove(path + channelId + ".zip") + except: + pass