mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Improve timeout error handling for Splunk (#40384)
* Bugfix to catch asyncio.timeout * Better asyncio.timeout warning message
This commit is contained in:
parent
7c344fa0cd
commit
b3691d5d90
@ -1,4 +1,5 @@
|
|||||||
"""Support to send data to a Splunk instance."""
|
"""Support to send data to a Splunk instance."""
|
||||||
|
import asyncio
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
@ -116,6 +117,8 @@ async def async_setup(hass, config):
|
|||||||
_LOGGER.warning(err)
|
_LOGGER.warning(err)
|
||||||
except ClientConnectionError as err:
|
except ClientConnectionError as err:
|
||||||
_LOGGER.warning(err)
|
_LOGGER.warning(err)
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
_LOGGER.warning("Connection to %s:%s timed out", host, port)
|
||||||
except ClientResponseError as err:
|
except ClientResponseError as err:
|
||||||
_LOGGER.error(err.message)
|
_LOGGER.error(err.message)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Splunk",
|
"name": "Splunk",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/splunk",
|
"documentation": "https://www.home-assistant.io/integrations/splunk",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"hass_splunk==0.1.0"
|
"hass_splunk==0.1.1"
|
||||||
],
|
],
|
||||||
"codeowners": [
|
"codeowners": [
|
||||||
"@Bre77"
|
"@Bre77"
|
||||||
|
@ -723,7 +723,7 @@ hangups==0.4.11
|
|||||||
hass-nabucasa==0.37.0
|
hass-nabucasa==0.37.0
|
||||||
|
|
||||||
# homeassistant.components.splunk
|
# homeassistant.components.splunk
|
||||||
hass_splunk==0.1.0
|
hass_splunk==0.1.1
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate==0.9.5
|
hdate==0.9.5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user