Skip to content

Commit 22cfceb

Browse files
authored
Fix content type checking for FKB 1.44+ (#11)
1 parent 7487c5c commit 22cfceb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

fullykiosk/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ async def get(self, **kwargs):
142142
)
143143
raise FullyKioskError(response.status, await response.text())
144144

145-
data = await response.json(content_type="text/html")
145+
try:
146+
data = await response.json()
147+
except aiohttp.client_exceptions.ContentTypeError:
148+
data = await response.json(content_type="text/html")
149+
146150
_LOGGER.debug(json.dumps(data))
147151
return data

0 commit comments

Comments
 (0)