Source code for rsync_system_backup.exceptions
# rsync-system-backup: Linux system backups powered by rsync.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: July 11, 2017
# URL: https://github.com/xolox/python-rsync-system-backup
"""Custom exceptions used by rsync-system-backup."""
[docs]class RsyncSystemBackupError(Exception):
"""Base exception for custom exceptions raised by rsync-system-backup."""
[docs]class InvalidDestinationError(RsyncSystemBackupError):
"""Raised when the given destination expression can't be parsed."""
[docs]class MissingBackupDiskError(RsyncSystemBackupError):
"""Raised when the encrypted filesystem isn't available."""
[docs]class FailedToUnlockError(RsyncSystemBackupError):
"""Raised when cryptdisks_start_ fails to unlock the encrypted device."""
[docs]class FailedToMountError(RsyncSystemBackupError):
"""Raised when mount_ fails to mount the backup destination."""
[docs]class DestinationContextUnavailable(RsyncSystemBackupError):
"""Raised when snapshot creation and rotation are disabled because we're connected to an rsync daemon."""
[docs]class ParentDirectoryUnavailable(RsyncSystemBackupError):
"""Raised when the parent directory of the backup directory cannot be determined."""
[docs]class InvalidDestinationDirectory(RsyncSystemBackupError):
"""Raised when the backup directory isn't located inside the given mount point."""