mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import subprocess
|
|
|
|
from freedombox.errors import FbxError
|
|
|
|
|
|
class BorgError(FbxError):
|
|
"""Generic borg errors."""
|
|
|
|
|
|
class BorgRepositoryDoesNotExistError(BorgError):
|
|
"""Borg access to a repository works but the repository does not exist."""
|
|
|
|
|
|
class SshError(subprocess.CalledProcessError):
|
|
"""Error when running an SSH command."""
|
|
|
|
|
|
class SshfsError(FbxError):
|
|
"""Generic sshfs errors."""
|
|
|
|
|
|
class BorgRepositoryExists(BorgError):
|
|
"""A repository at target location already exists during initialization."""
|
|
|
|
|
|
class BorgUnencryptedRepository(BorgError):
|
|
"""Attempt to provide password on an unencrypted repository."""
|
|
|
|
|
|
class BorgArchiveExists(BorgError):
|
|
"""A archive with the given name already exists in the repository."""
|
|
|
|
|
|
class BorgArchiveDoesNotExist(BorgError):
|
|
"""Specified archive does not exist in the repository."""
|
|
|
|
|
|
class BorgBusy(BorgError):
|
|
"""Borg could not acquire lock being busy with another operation."""
|
|
|
|
|
|
class BorgNoSpace(BorgError):
|
|
"""There is not enough space left on the device to perform operation."""
|