mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Broaden exception handling for IQVIA (#32708)
This commit is contained in:
parent
8bc542776b
commit
76b0302c7f
@ -4,7 +4,7 @@ from datetime import timedelta
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from pyiqvia import Client
|
from pyiqvia import Client
|
||||||
from pyiqvia.errors import InvalidZipError, IQVIAError
|
from pyiqvia.errors import InvalidZipError
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.config_entries import SOURCE_IMPORT
|
from homeassistant.config_entries import SOURCE_IMPORT
|
||||||
@ -172,7 +172,7 @@ class IQVIAData:
|
|||||||
results = await asyncio.gather(*tasks.values(), return_exceptions=True)
|
results = await asyncio.gather(*tasks.values(), return_exceptions=True)
|
||||||
|
|
||||||
for key, result in zip(tasks, results):
|
for key, result in zip(tasks, results):
|
||||||
if isinstance(result, IQVIAError):
|
if isinstance(result, Exception):
|
||||||
_LOGGER.error("Unable to get %s data: %s", key, result)
|
_LOGGER.error("Unable to get %s data: %s", key, result)
|
||||||
self.data[key] = {}
|
self.data[key] = {}
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user