mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-10 11:29:51 +00:00
Handle OS errors on backup create (#5662)
* Handle permission error on backup create Make sure we handle (write) permission errors when creating a backup. * Introduce BackupFileExistError and BackupPermissionError exceptions * Make error messages a bit more uniform * Drop use of exclusive mode SecureTar does not handle exclusive mode nicely. Drop use of it for now.
This commit is contained in:
@@ -663,6 +663,14 @@ class BackupFileNotFoundError(BackupError):
|
||||
"""Raise if the backup file hasn't been found."""
|
||||
|
||||
|
||||
class BackupPermissionError(BackupError):
|
||||
"""Raise if we could not write the backup due to permission error."""
|
||||
|
||||
|
||||
class BackupFileExistError(BackupError):
|
||||
"""Raise if the backup file already exists."""
|
||||
|
||||
|
||||
# Security
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user