diff --git a/homeassistant/components/backup/util.py b/homeassistant/components/backup/util.py index 8112faf4459..1a32c938a54 100644 --- a/homeassistant/components/backup/util.py +++ b/homeassistant/components/backup/util.py @@ -332,6 +332,9 @@ def decrypt_backup( except (DecryptError, SecureTarError, tarfile.TarError) as err: LOGGER.warning("Error decrypting backup: %s", err) error = err + except Exception as err: # noqa: BLE001 + LOGGER.exception("Unexpected error when decrypting backup: %s", err) + error = err else: # Pad the output stream to the requested minimum size padding = max(minimum_size - output_stream.tell(), 0) @@ -417,6 +420,9 @@ def encrypt_backup( except (EncryptError, SecureTarError, tarfile.TarError) as err: LOGGER.warning("Error encrypting backup: %s", err) error = err + except Exception as err: # noqa: BLE001 + LOGGER.exception("Unexpected error when decrypting backup: %s", err) + error = err else: # Pad the output stream to the requested minimum size padding = max(minimum_size - output_stream.tell(), 0)