Better handling of second KeyboardInterrupt
Now the second KeyboardInterrupt will be cleanly handled by the parent process.
This commit is contained in:
1 parent
b596fa33d6
commit
519abbbfa2
1 file changed
+4
-1
@@ -258,7 +258,10 @@ def run_hass_process(hass_proc):
|
||||
hass_proc.join()
|
||||
except KeyboardInterrupt:
|
||||
request_stop()
|
||||
hass_proc.join()
|
||||
try:
|
||||
hass_proc.join()
|
||||
except KeyboardInterrupt:
|
||||
return False
|
||||
return not requested_stop.isSet() and hass_proc.exitcode > 0
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user