Skip to content

bug #325: Fix print output in @at_cleanup functions not appearing in node console#343

Merged
scroix merged 1 commit into
museumsvictoria:devfrom
scroix:fix/issue325-print-during-cleanup
Apr 15, 2025
Merged

bug #325: Fix print output in @at_cleanup functions not appearing in node console#343
scroix merged 1 commit into
museumsvictoria:devfrom
scroix:fix/issue325-print-during-cleanup

Conversation

@scroix
Copy link
Copy Markdown
Member

@scroix scroix commented Oct 7, 2024

As described in #325 print messages aren't redirected to the Nodel console during clean-up.

The issue appears to be that when the cleanup function(s) are triggered, the Python interpreter's system state isn't set correctly, and subsequently sys.stdout and sys.stderr redirects aren't established.

This PR does the most obvious thing and (1) resets the interpreter's state and (2) assigns the output streams to the node's console before running through the list of clean-up functions provided by a node.

2024-10-07_8PrPbcLW

@scroix scroix added bug Something isn't working as expected minor Low priority or minimal impact labels Oct 7, 2024
@scroix scroix requested a review from justparking October 7, 2024 04:45
@scroix scroix merged commit c5fb6ab into museumsvictoria:dev Apr 15, 2025
@scroix scroix deleted the fix/issue325-print-during-cleanup branch January 9, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected minor Low priority or minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant