mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Don't raise when removing non-existing cloud backup (#133429)
This commit is contained in:
parent
3341e3d95b
commit
89eda9e068
@ -167,7 +167,7 @@ class CloudBackupAgent(BackupAgent):
|
|||||||
:param backup_id: The ID of the backup that was returned in async_list_backups.
|
:param backup_id: The ID of the backup that was returned in async_list_backups.
|
||||||
"""
|
"""
|
||||||
if not await self.async_get_backup(backup_id):
|
if not await self.async_get_backup(backup_id):
|
||||||
raise BackupAgentError("Backup not found")
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await async_files_delete_file(
|
await async_files_delete_file(
|
||||||
|
@ -570,4 +570,4 @@ async def test_agents_delete_not_found(
|
|||||||
response = await client.receive_json()
|
response = await client.receive_json()
|
||||||
|
|
||||||
assert response["success"]
|
assert response["success"]
|
||||||
assert response["result"] == {"agent_errors": {"cloud.cloud": "Backup not found"}}
|
assert response["result"] == {"agent_errors": {}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user