Do not pass None as timeout to http requests (#1203)

This commit is contained in:
Steven B.
2024-10-29 11:52:53 +00:00
committed by GitHub
parent 7483411ca2
commit b82743a5de
3 changed files with 5 additions and 4 deletions

View File

@@ -89,6 +89,8 @@ class HttpClient:
self._last_url = url
self.client.cookie_jar.clear()
return_json = bool(json)
if self._config.timeout is None:
_LOGGER.warning("Request timeout is set to None.")
client_timeout = aiohttp.ClientTimeout(total=self._config.timeout)
# If json is not a dict send as data.