Skip to content

Commit

Permalink
set attatched to False in the first place when error is catched
Browse files Browse the repository at this point in the history
  • Loading branch information
skywind3000 committed Oct 30, 2024
1 parent e91372c commit b8e4364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PyStand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ const char *init_script =
" sys.stderr = fp\n"
" attached = True\n"
"except Exception as e:\n"
" attached = False\n"
" try:\n"
" fp = open(os.devnull, 'w', errors='ignore')\n"
" sys.stdout = fp\n"
" sys.stderr = fp\n"
" attached = False\n"
" except:\n"
" pass\n"
#endif
Expand Down

0 comments on commit b8e4364

Please sign in to comment.