mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Merge pull request #304 from rmkraus/daemon
Fixed signal binding exception
This commit is contained in:
commit
53fb46b44b
@ -82,7 +82,11 @@ class HomeAssistant(object):
|
|||||||
DOMAIN, SERVICE_HOMEASSISTANT_STOP, stop_homeassistant)
|
DOMAIN, SERVICE_HOMEASSISTANT_STOP, stop_homeassistant)
|
||||||
|
|
||||||
if os.name != "nt":
|
if os.name != "nt":
|
||||||
signal.signal(signal.SIGQUIT, stop_homeassistant)
|
try:
|
||||||
|
signal.signal(signal.SIGQUIT, stop_homeassistant)
|
||||||
|
except ValueError:
|
||||||
|
_LOGGER.warning(
|
||||||
|
'Could not bind to SIGQUIT. Are you running in a thread?')
|
||||||
|
|
||||||
while not request_shutdown.isSet():
|
while not request_shutdown.isSet():
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user