Handle KeyError when loading backups (#70028)

This commit is contained in:
Joakim Sørensen 2022-04-14 18:56:59 +02:00 committed by Paulus Schoutsen
parent 8bdce8ef68
commit e01faa7a8f

View File

@ -108,7 +108,7 @@ class BackupManager:
size=round(backup_path.stat().st_size / 1_048_576, 2),
)
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)
return backups