mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-21 14:20:31 -04:00
add NotFoundWarning
This commit is contained in:
parent
ead9fe4763
commit
82f147f63f
2 changed files with 9 additions and 0 deletions
|
|
@ -703,6 +703,8 @@ Warnings
|
|||
{}: {}
|
||||
IOWarning rc: 106
|
||||
{}: {}
|
||||
NotFoundWarning rc: 107
|
||||
{}: {}
|
||||
|
||||
Operations
|
||||
- cache.begin_transaction
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@ class BackupOSWarning(BorgWarning):
|
|||
assert isinstance(exc, BackupOSError)
|
||||
if exc.errno in (errno.EPERM, errno.EACCES, ):
|
||||
return PermissionWarning.exit_mcode
|
||||
elif exc.errno in (errno.ENOENT, ):
|
||||
return NotFoundWarning.exit_mcode
|
||||
elif exc.errno in (errno.EIO, ):
|
||||
return IOWarning.exit_mcode
|
||||
else:
|
||||
|
|
@ -133,6 +135,11 @@ class IOWarning(BorgWarning):
|
|||
exit_mcode = 106
|
||||
|
||||
|
||||
class NotFoundWarning(BorgWarning):
|
||||
"""{}: {}"""
|
||||
exit_mcode = 107
|
||||
|
||||
|
||||
class BackupError(Exception):
|
||||
"""
|
||||
Exception raised for non-OSError-based exceptions while accessing backup files.
|
||||
|
|
|
|||
Loading…
Reference in a new issue