Skip to content

Commit

Permalink
Use http.HTTPStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
definitio committed Dec 12, 2021
1 parent 9fb04db commit 896412c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/rhvoice/tts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Support for the RHVoice tts service."""
import logging
from asyncio import TimeoutError as aioTimeoutError
from http import HTTPStatus
from itertools import chain

import async_timeout
Expand All @@ -13,7 +14,6 @@
CONF_SSL,
CONF_TIMEOUT,
CONF_VERIFY_SSL,
HTTP_OK,
)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
Expand Down Expand Up @@ -136,7 +136,7 @@ async def async_get_tts_audio(self, message, language, options=None):
self._url, params=url_param, verify_ssl=self._verify_ssl
)

if request.status != HTTP_OK:
if request.status != HTTPStatus.OK:
_LOGGER.error(
"Error %d on load URL %s", request.status, request.url
)
Expand Down

0 comments on commit 896412c

Please sign in to comment.