mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Handle KeyError when loading backups (#70028)
This commit is contained in:
parent
ddafc50fb4
commit
b44ce32c7f
@ -108,7 +108,7 @@ class BackupManager:
|
|||||||
size=round(backup_path.stat().st_size / 1_048_576, 2),
|
size=round(backup_path.stat().st_size / 1_048_576, 2),
|
||||||
)
|
)
|
||||||
backups[backup.slug] = backup
|
backups[backup.slug] = backup
|
||||||
except (OSError, TarError, json.JSONDecodeError) as err:
|
except (OSError, TarError, json.JSONDecodeError, KeyError) as err:
|
||||||
LOGGER.warning("Unable to read backup %s: %s", backup_path, err)
|
LOGGER.warning("Unable to read backup %s: %s", backup_path, err)
|
||||||
return backups
|
return backups
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user