Catch all OS errors when removing old local backups

Errors other than a missing directory or denied permission (e.g. read-only filesystem, device busy) ended in a traceback after the backup.
This commit is contained in:
Fuxino
2026-10-21 22:32:50 +02:00
parent db4059ff36
commit ac59969d82
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -405,6 +405,9 @@ class Backup:
except PermissionError:
logger.error(
'Error while removing backup %s. Permission denied', dirs[i])
except OSError as e:
# E.g. read-only filesystem or device busy
logger.error('Error while removing backup %s. %s', dirs[i], e.strerror or e)
self._removed_count = count