From 5d13bd3c4400cc52ee60cf0bbf7b3759088d691e 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