mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Catch possible errors from tradfri (#17068)
* Catch possible errors from tradfri * Update config_flow.py
This commit is contained in:
parent
38e2926a48
commit
31dd327c59
@ -169,7 +169,9 @@ async def get_gateway_info(hass, host, identity, key):
|
|||||||
api = factory.request
|
api = factory.request
|
||||||
gateway = Gateway()
|
gateway = Gateway()
|
||||||
gateway_info_result = await api(gateway.get_gateway_info())
|
gateway_info_result = await api(gateway.get_gateway_info())
|
||||||
except RequestError:
|
except (OSError, RequestError):
|
||||||
|
# We're also catching OSError as PyTradfri doesn't catch that one yet
|
||||||
|
# Upstream PR: https://github.com/ggravlingen/pytradfri/pull/189
|
||||||
raise AuthError('cannot_connect')
|
raise AuthError('cannot_connect')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user