Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check self.access_token after set. #1147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion S3/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ def __init__(self, configfile = None, access_key=None, secret_key=None, access_t
self.secret_key = secret_key
if access_token:
self.access_token = access_token
# Do not refresh the IAM role when an access token is provided.
# Do not refresh the IAM role when an access token is provided.
if self.access_token:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's basically equal to previous if statement

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that it is the case if i'm not wrong.

Without this fix, if the access_token is set directly in the configuration file (and not set with command line or env var); then the access_token_refresh will not be disabled.

But, I'm wondering if there is not a side effect to this. Something like the goal was especially to not be stuck if an access token was written in the file. Especially for the case of a "configure" that would write the access token.

self._access_token_refresh = False

if len(self.access_key)==0:
Expand Down