From e7caac212d183c8478851e99bb96d707f961008f Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Tue, 1 Sep 2015 04:03:51 -0400 Subject: [PATCH 1/2] Fixed signal binding exception Cleanly handle error for failed SIGQUIT binding. This can happen when running in a thread. --- homeassistant/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/core.py b/homeassistant/core.py index 1e48fce8029..4a20bfc5002 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: From a92687bb0849b6bfe53e6062b2608b240b99dc4c Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 1 Sep 2015 01:12:55 -0700 Subject: [PATCH 2/2] Exclude tests from package --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']