Fix signal handler cleanup bug when startup fails early #45
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JackFrostbyte/rgb-aura#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
A review found a real runtime bug in
runtime.py.previous_sigterm_handlercan be referenced in thefinallyblock before it is assigned. If startup fails before the signal handler is registered — for example OpenRGB unreachable, device mapping mismatch, or runtime zone validation failure — the cleanup path can raiseUnboundLocalError.That masks the original exception and makes troubleshooting harder.
Scope
previous_sigterm_handler = Nonebefore thetryblock.finallycleanup safe when startup fails before signal registration.Acceptance criteria
UnboundLocalError.ruff formatpasses.ruff checkpasses.Branch workflow
Base branch:
developSuggested work branch:
fix/issue-45-signal-handler-startup-failurePull request target:
developDo not merge directly into
main.mainshould only receive tested release-ready changes fromdevelop.