Added spcific exception type for failure to communicate with Vera controller

This commit is contained in:
jamespcole committed 2015-03-09 07:46:26 +11:00
1 parent 6dc18ba603
commit 38fbc3595a
3 files changed
+6 -7

No files matched your search

+2 -2
View File
@@ -83,8 +83,8 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
devices = []
try:
devices = controller.get_devices('Switch')
# pylint: disable=broad-except
except Exception as inst:
except IOError as inst:
# There was a network related error connecting to the vera controller
_LOGGER.error("Could not find Vera lights: %s", inst)
return False