mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 16:17:20 +00:00
Merge pull request #1155 from balloob/fix-kb-interrupt
Fix Ctrl+C with Subprocesses
This commit is contained in:
commit
4103d7463b
@ -95,7 +95,10 @@ class HomeAssistant(object):
|
|||||||
'Could not bind to SIGTERM. Are you running in a thread?')
|
'Could not bind to SIGTERM. Are you running in a thread?')
|
||||||
|
|
||||||
while not request_shutdown.isSet():
|
while not request_shutdown.isSet():
|
||||||
|
try:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
break
|
||||||
|
|
||||||
self.stop()
|
self.stop()
|
||||||
return RESTART_EXIT_CODE if request_restart.isSet() else 0
|
return RESTART_EXIT_CODE if request_restart.isSet() else 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user