mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 15:27:08 +00:00
Log cloud backup agent file list (#134556)
This commit is contained in:
parent
e43f72c452
commit
92655fd640
@ -5,6 +5,7 @@ from __future__ import annotations
|
|||||||
import base64
|
import base64
|
||||||
from collections.abc import AsyncIterator, Callable, Coroutine, Mapping
|
from collections.abc import AsyncIterator, Callable, Coroutine, Mapping
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import logging
|
||||||
from typing import Any, Self
|
from typing import Any, Self
|
||||||
|
|
||||||
from aiohttp import ClientError, ClientTimeout, StreamReader
|
from aiohttp import ClientError, ClientTimeout, StreamReader
|
||||||
@ -23,6 +24,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|||||||
from .client import CloudClient
|
from .client import CloudClient
|
||||||
from .const import DATA_CLOUD, DOMAIN, EVENT_CLOUD_EVENT
|
from .const import DATA_CLOUD, DOMAIN, EVENT_CLOUD_EVENT
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
_STORAGE_BACKUP = "backup"
|
_STORAGE_BACKUP = "backup"
|
||||||
|
|
||||||
|
|
||||||
@ -208,6 +210,7 @@ class CloudBackupAgent(BackupAgent):
|
|||||||
"""List backups."""
|
"""List backups."""
|
||||||
try:
|
try:
|
||||||
backups = await async_files_list(self._cloud, storage_type=_STORAGE_BACKUP)
|
backups = await async_files_list(self._cloud, storage_type=_STORAGE_BACKUP)
|
||||||
|
_LOGGER.debug("Cloud backups: %s", backups)
|
||||||
except (ClientError, CloudError) as err:
|
except (ClientError, CloudError) as err:
|
||||||
raise BackupAgentError("Failed to list backups") from err
|
raise BackupAgentError("Failed to list backups") from err
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user