Merge pull request #1155 from balloob/fix-kb-interrupt

Fix Ctrl+C with Subprocesses
This commit is contained in:
Paulus Schoutsen 2016-02-06 20:12:27 -08:00
commit 4103d7463b

View file

@ -95,7 +95,10 @@ class HomeAssistant(object):
'Could not bind to SIGTERM. Are you running in a thread?')
while not request_shutdown.isSet():
time.sleep(1)
try:
time.sleep(1)
except KeyboardInterrupt:
break
self.stop()
return RESTART_EXIT_CODE if request_restart.isSet() else 0