Skip to content

qtvcp: move return out of finally in SAVE_PROGRAM#4171

Merged
BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:fix/4169-finally-return
Jun 16, 2026
Merged

qtvcp: move return out of finally in SAVE_PROGRAM#4171
BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:fix/4169-finally-return

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

return npath sat inside the finally block, which silently overrode the except branch's return None. SAVE_PROGRAM returned a valid looking path even when the write failed, swallowing the exception. Dedenting it to the method body restores the intended error semantics and clears the SyntaxWarning Python 3.14 emits for return in finally.

Fixes #4169. Same approach as #4075.

return npath sat inside the finally block, which silently overrode the
except branch's return None. SAVE_PROGRAM therefore returned a valid
looking path even when the write failed, swallowing the exception.
Dedenting it to the method body restores the intended error semantics
and clears the SyntaxWarning Python 3.14 emits for return in finally.

Fixes LinuxCNC#4169.
@grandixximo

Copy link
Copy Markdown
Contributor Author

@c-morley same line of bug as #4075 found by @BsAtHome builds clean, waiting on your akn to merge.

@BsAtHome

Copy link
Copy Markdown
Contributor

This is a clear-cut bug.

@BsAtHome BsAtHome merged commit 59c5a73 into LinuxCNC:master Jun 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests/ui-smote/qtdragon-quit consistently fails on F43

2 participants