Fix await for response text.

This commit is contained in:
Matthew Stratford 2021-09-09 00:35:25 +01:00
parent ce17793c5e
commit 398c0ac0ce

View file

@ -58,7 +58,7 @@ class MyRadioAPI:
self._logException( self._logException(
"Failed to get API request. Status code: " + str(response.status) "Failed to get API request. Status code: " + str(response.status)
) )
self._logException(str(response.text())) self._logException(str(await response.text()))
return await response.read() return await response.read()
def call(self, url, method="GET", data=None, timeout=10, json_payload=True): def call(self, url, method="GET", data=None, timeout=10, json_payload=True):