File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1818
1919import signal
2020import atexit
21+ import sys
2122
2223from neopia .scanner import Scanner
2324from neopia .mode import Mode
@@ -68,11 +69,11 @@ def parallel(*functions):
6869def _handle_signal (signal , frame ):
6970 Runner .shutdown ()
7071 raise SystemExit
71-
72- signal .signal (signal .SIGINT , _handle_signal )
72+ signal .signal (signal .SIGINT , _handle_signal ) # CTRL+C
73+ if sys .platform != "win32" :
74+ signal .signal (signal .SIGHUP , _handle_signal ) # When kill process in VS code
7375
7476# It's called for a safe exit by sending initial packet to HW, even a normal exit
7577def exit_handler ():
7678 Runner .shutdown ()
77-
7879atexit .register (exit_handler )
Original file line number Diff line number Diff line change 22
33setup (
44 name = "neopia" ,
5- version = "0.2.3 " ,
5+ version = "0.2.4 " ,
66 author = "RoboticsWare" ,
7788 description = "Python library for NEOPIA Neobot" ,
You can’t perform that action at this time.
0 commit comments