Merge pull request #2936 from pypeclub/bugfix/OP-2836_More-failsafes-prevent-errored-runs

General: More fail safe delete old versions
This commit is contained in:
Jakub Trllo 2022-03-25 17:37:32 +01:00 committed by GitHub
commit ce0bb1bf3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -492,7 +492,8 @@ class DeleteOldVersions(BaseAction):
os.remove(file_path)
self.log.debug("Removed file: {}".format(file_path))
remainders.remove(file_path_base)
if file_path_base in remainders:
remainders.remove(file_path_base)
continue
seq_path_base = os.path.split(seq_path)[1]