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 18
18
19
19
import signal
20
20
import atexit
21
+ import sys
21
22
22
23
from neopia .scanner import Scanner
23
24
from neopia .mode import Mode
@@ -68,11 +69,11 @@ def parallel(*functions):
68
69
def _handle_signal (signal , frame ):
69
70
Runner .shutdown ()
70
71
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
73
75
74
76
# It's called for a safe exit by sending initial packet to HW, even a normal exit
75
77
def exit_handler ():
76
78
Runner .shutdown ()
77
-
78
79
atexit .register (exit_handler )
Original file line number Diff line number Diff line change 2
2
3
3
setup (
4
4
name = "neopia" ,
5
- version = "0.2.3 " ,
5
+ version = "0.2.4 " ,
6
6
author = "RoboticsWare" ,
7
7
8
8
description = "Python library for NEOPIA Neobot" ,
You can’t perform that action at this time.
0 commit comments