mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
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:
parent
ab397e2b1a
commit
6d7dbe5536
@ -52,8 +52,8 @@ def setup(hass, config):
|
|||||||
try:
|
try:
|
||||||
zapi.login(username, password)
|
zapi.login(username, password)
|
||||||
_LOGGER.info("Connected to Zabbix API Version %s", zapi.api_version())
|
_LOGGER.info("Connected to Zabbix API Version %s", zapi.api_version())
|
||||||
except ZabbixAPIException:
|
except ZabbixAPIException as login_exception:
|
||||||
_LOGGER.error("Unable to login to the Zabbix API")
|
_LOGGER.error("Unable to login to the Zabbix API: %s", login_exception)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
hass.data[DOMAIN] = zapi
|
hass.data[DOMAIN] = zapi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user