Skip to content

Commit

Permalink
Temporarily disable pylint checks for AsyncServiceBusSharedKeyCredent…
Browse files Browse the repository at this point in the history
…ialPolicy.

In the mid-term we need to deprecate the Async versions of this policy and credential to unify on a single model in the primary namespace, see issue here: #12533
  • Loading branch information
KieranBrantnerMagee committed Jul 14, 2020
1 parent 795bd20 commit 5d744cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def __init__(self, endpoint: str, credential: ServiceBusSharedKeyCredential, nam
self._token_expiry_on = 0
self._token = None

async def _update_token(self):
async def _update_token(self): # pylint: disable=invalid-overridden-method
if self._token_expiry_on + 60 <= time.time(): # Update token if it's expiring in 60 seconds
access_token, self._token_expiry_on = await self._credential.get_token(self._endpoint)
self._token = access_token.decode("utf-8")

async def on_request(self, request):
async def on_request(self, request): # pylint: disable=invalid-overridden-method
await self._update_token()
request.http_request.headers[self._name] = self._token

0 comments on commit 5d744cd

Please sign in to comment.