Merge pull request #1155 from balloob/fix-kb-interrupt
Fix Ctrl+C with Subprocesses
This commit is contained in:
commit
4103d7463b
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue