Improve timeout error handling for Splunk (#40384)

* Bugfix to catch asyncio.timeout

* Better asyncio.timeout warning message
This commit is contained in:
Brett authored and GitHub committed 2020-09-21 20:01:52 -05:00
1 parent 7c344fa0cd
commit b3691d5d90
3 files changed
+5 -2

No files matched your search

@@ -1,4 +1,5 @@
"""Support to send data to a Splunk instance."""
import asyncio
import json
import logging
import time
@@ -116,6 +117,8 @@ async def async_setup(hass, config):
_LOGGER.warning(err)
except ClientConnectionError as err:
_LOGGER.warning(err)
except asyncio.TimeoutError:
_LOGGER.warning("Connection to %s:%s timed out", host, port)
except ClientResponseError as err:
_LOGGER.error(err.message)
@@ -3,7 +3,7 @@
"name": "Splunk",
"documentation": "https://www.home-assistant.io/integrations/splunk",
"requirements": [
"hass_splunk==0.1.0"
"hass_splunk==0.1.1"
],
"codeowners": [
"@Bre77"
+1 -1
View File
@@ -723,7 +723,7 @@ hangups==0.4.11
hass-nabucasa==0.37.0
# homeassistant.components.splunk
hass_splunk==0.1.0
hass_splunk==0.1.1
# homeassistant.components.jewish_calendar
hdate==0.9.5