Better handling of second KeyboardInterrupt

Now the second KeyboardInterrupt will be cleanly handled by the parent
process.
This commit is contained in:
Ryan Kraus 2016-01-26 22:41:57 -05:00
parent b596fa33d6
commit 519abbbfa2

View File

@ -258,7 +258,10 @@ def run_hass_process(hass_proc):
hass_proc.join()
except KeyboardInterrupt:
request_stop()
try:
hass_proc.join()
except KeyboardInterrupt:
return False
return not requested_stop.isSet() and hass_proc.exitcode > 0