File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 77
88from homeassistant .helpers .aiohttp_client import async_create_clientsession
99from aiohttp import CookieJar
10+
1011from pyhilo .const import AUTH_AUTHORIZE , AUTH_CLIENT_ID , AUTH_TOKEN , DOMAIN
1112from pyhilo .oauth2helper import OAuth2Helper
1213
@@ -61,12 +62,5 @@ async def _token_request(self, data: dict) -> dict:
6162 data ["client_secret" ] = self .client_secret
6263
6364 resp = await self .session .post (self .token_url , data = data )
64- if resp .status >= 400 :
65- try :
66- error_response = await resp .json ()
67- except (ClientError , JSONDecodeError ):
68- error_response = {}
69- error_code = error_response .get ("error" , "unknown" )
70- error_description = error_response .get ("error_description" , "unknown error" )
7165 resp .raise_for_status ()
7266 return cast (dict , await resp .json ())
You can’t perform that action at this time.
0 commit comments