Skip to content

Commit

Permalink
Properly store access token so it can be used by creds
Browse files Browse the repository at this point in the history
  • Loading branch information
ifigotin committed Mar 7, 2019
1 parent a6ba32e commit 513ccea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions patches/kaggle_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ class KaggleKernelCredentials(credentials.Credentials):
"""

def refresh(self, request):
print("Calling Kaggle.UserSecrets to refresh token.")
try:
client = UserSecretsClient()
fresh_token = client.get_bigquery_access_token()
self.token = client.get_bigquery_access_token()
except Exception as e:
raise RefreshError('Unable to refresh access token.') from e

Expand Down

0 comments on commit 513ccea

Please sign in to comment.