Skip to content

Commit

Permalink
Revert "style: fix lint error"
Browse files Browse the repository at this point in the history
This reverts commit ec1b1e6.
  • Loading branch information
alandtse committed Jan 31, 2021
1 parent ed7a355 commit 9fd7298
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions teslajsonpy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async def __open(
f'{data.get("error")}:{data.get("error_description")}'
)
except aiohttp.ClientResponseError as exception_:
raise TeslaException(exception_.status) from exception_
raise TeslaException(exception_.status)
return data

async def websocket_connect(self, vin: int, vehicle_id: int, **kwargs):
Expand Down Expand Up @@ -434,10 +434,10 @@ async def refresh_access_token(self, refresh_token):
"refresh_token": refresh_token,
"scope": "openid email offline_access",
}
auth = await self.websession.post(
"https://auth.tesla.com/oauth2/v3/token", data=oauth,
auth = await self.__open(
"/oauth2/v3/token", "post", data=oauth, baseurl="https://auth.tesla.com",
)
return await auth.json()
return auth

async def get_bearer_token(self, access_token):
"""Get bearer token. This is used by the owners API."""
Expand Down

0 comments on commit 9fd7298

Please sign in to comment.