Skip to content

Commit 021bd1d

Browse files
committed
Don't call os.kill on Windows if running inside Spyder
1 parent e94465d commit 021bd1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpython/no_notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def onClose(self, wasClean, code, reason):
211211
# Only the main thread can properly call sys.exit, so have a signal
212212
# handler call it on the main thread's behalf.
213213
if platform.system() == 'Windows':
214-
if threading.main_thread().is_alive():
214+
if threading.main_thread().is_alive() and not _in_spyder:
215215
# On windows, if we get here then this signal won't be caught
216216
# by our signal handler. Just call it ourselves.
217217
os.kill(os.getpid(), signal.CTRL_C_EVENT)

0 commit comments

Comments
 (0)