Use HTTP_BAD_REQUEST constant (#33797)
This commit is contained in:
1 parent
d510384c0d
commit
4c38e6cfa5
24 files changed
+111
-61
No files matched your search
@@ -15,6 +15,7 @@ from homeassistant.const import (
|
||||
CONF_URL,
|
||||
CONF_USERNAME,
|
||||
CONF_VERIFY_SSL,
|
||||
HTTP_BAD_REQUEST,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
@@ -119,7 +120,7 @@ async def async_setup(hass, config):
|
||||
timeout=timeout,
|
||||
) as response:
|
||||
|
||||
if response.status < 400:
|
||||
if response.status < HTTP_BAD_REQUEST:
|
||||
_LOGGER.debug(
|
||||
"Success. Url: %s. Status code: %d.",
|
||||
response.url,
|
||||
|
||||
Reference in new issue
Block a user