1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-05-21 07:08:53 +01:00
Files
supervisor/tests/api
Stefan Agner ff90e4b817 Fix UnboundLocalError when Core API fails post-update (#6761)
When get_config() raised HomeAssistantError after a Core update, the
except block set error_state and fell through to the frontend check,
which referenced an unbound `data` variable and raised UnboundLocalError.
That aborted the update with a JobException and skipped the rollback
path entirely.

Move the frontend checks into an else branch of the try/except so they
only run when get_config() succeeds. When it fails, error_state is set
and control falls through to the rollback logic below, which is what
PR #6726 intended.

Fixes SUPERVISOR-1JVX

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 15:05:40 +02:00
..