Skip to content

Commit

Permalink
Fix content type checking for FKB 1.44+ (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgarwood authored Oct 4, 2021
1 parent 7487c5c commit 22cfceb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fullykiosk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ async def get(self, **kwargs):
)
raise FullyKioskError(response.status, await response.text())

data = await response.json(content_type="text/html")
try:
data = await response.json()
except aiohttp.client_exceptions.ContentTypeError:
data = await response.json(content_type="text/html")

_LOGGER.debug(json.dumps(data))
return data

0 comments on commit 22cfceb

Please sign in to comment.