Skip to content

Commit b8e4364

Browse files
author
skywind3000
committed
set attatched to False in the first place when error is catched
1 parent e91372c commit b8e4364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PyStand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ const char *init_script =
345345
" sys.stderr = fp\n"
346346
" attached = True\n"
347347
"except Exception as e:\n"
348+
" attached = False\n"
348349
" try:\n"
349350
" fp = open(os.devnull, 'w', errors='ignore')\n"
350351
" sys.stdout = fp\n"
351352
" sys.stderr = fp\n"
352-
" attached = False\n"
353353
" except:\n"
354354
" pass\n"
355355
#endif

0 commit comments

Comments
 (0)