Modify removeChannelsBeingTreated.py to be more resilient against not existing files in the treatment process

This commit is contained in:
Benjamin Loison 2023-01-04 03:10:28 +01:00
parent 9d5c9fde2a
commit dab4c8ff69
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -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