diff --git a/homeassistant/core.py b/homeassistant/core.py index 01ac75cbbcb..4b10d73e0a1 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -82,7 +82,11 @@ class HomeAssistant(object): DOMAIN, SERVICE_HOMEASSISTANT_STOP, stop_homeassistant) 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(): try: diff --git a/setup.py b/setup.py index 337b3767c1e..c1a1e94c6d1 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ with open(os.path.join(HERE, PACKAGE_NAME, 'const.py')) as fp: DOWNLOAD_URL = \ 'https://github.com/balloob/home-assistant/archive/{}.zip'.format(VERSION) -PACKAGES = find_packages() + \ +PACKAGES = find_packages(exclude=['tests', 'tests.*']) + \ ['homeassistant.external', 'homeassistant.external.noop', 'homeassistant.external.nzbclients', 'homeassistant.external.vera']