Skip to content

Commit

Permalink
localapi: aiohttp_request: drop encoding workaround
Browse files Browse the repository at this point in the history
This code is now unreachable since all legacy devices that need it rely on the
custom http_quirks requests instead of the aiohttp requests.

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Oct 12, 2024
1 parent 5be9fcc commit 11afb3c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions aioairzone/localapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,6 @@ async def aiohttp_request(
resp_json = await resp.json(content_type=None)
except JSONDecodeError as err:
raise InvalidHost(err) from err
except UnicodeDecodeError:
# Workaround bogus encoding
try:
resp_json = await resp.json(
encoding="iso-8859-1",
content_type=None,
)
except JSONDecodeError as err:
raise InvalidHost(err) from err

_LOGGER.debug("aiohttp response: %s", resp_json)
if resp.status != 200:
Expand Down

0 comments on commit 11afb3c

Please sign in to comment.