Show the error message when Zabbix fails to log in (#12985)

* Show the error message when Zabbix fails to log in

* More verbose name for exception variable
This commit is contained in:
Jacob Mansfield 2018-03-08 23:25:10 +00:00 committed by Paulus Schoutsen
parent ab397e2b1a
commit 6d7dbe5536

View file

@ -52,8 +52,8 @@ def setup(hass, config):
try:
zapi.login(username, password)
_LOGGER.info("Connected to Zabbix API Version %s", zapi.api_version())
except ZabbixAPIException:
_LOGGER.error("Unable to login to the Zabbix API")
except ZabbixAPIException as login_exception:
_LOGGER.error("Unable to login to the Zabbix API: %s", login_exception)
return False
hass.data[DOMAIN] = zapi