Fix oauth2 template by updating outdated method name (#39486)

This commit is contained in:
Aidan Timson 2020-08-31 09:25:25 +01:00 committed by GitHub
parent a1678368cf
commit 09efbc569f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ class AsyncConfigEntryAuth(my_pypi_package.AbstractAuth):
async def async_get_access_token(self):
"""Return a valid access token."""
if not self._oauth_session.is_valid:
if not self._oauth_session.valid_token:
await self._oauth_session.async_ensure_token_valid()
return self._oauth_session.token