Skip to content

Commit

Permalink
Check if static access_token exists before developer token refresh, f…
Browse files Browse the repository at this point in the history
  • Loading branch information
sserrata committed Apr 3, 2020
1 parent 8243ec5 commit 00b7921
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pan_cortex_data_lake/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ def refresh(self, access_token=None, **kwargs):
if not self.token_lock.locked():
with self.token_lock:
if access_token == self.access_token or access_token is None:
if self.developer_token is not None:
if self.developer_token is not None and not any(
[self.access_token_, os.getenv("PAN_ACCESS_TOKEN")]
):
parsed_provider = urlparse(self.developer_token_provider)
url = "{}://{}".format(
parsed_provider.scheme, parsed_provider.netloc
Expand Down

0 comments on commit 00b7921

Please sign in to comment.