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

Ignore credential_process when set to the empty string #3099

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion botocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ def __init__(self, profile_name, load_config, popen=subprocess.Popen):

def load(self):
credential_process = self._credential_process
if credential_process is None:
if not credential_process:
return

creds_dict = self._retrieve_credentials_using(credential_process)
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -3225,6 +3225,13 @@ def test_process_not_invoked_if_not_configured_for_empty_config(self):
provider = self.create_process_provider()
self.assertIsNone(provider.load())

def test_process_not_invoked_if_set_to_empty_string(self):
self.loaded_config['profiles'] = {
'default': {'credential_process': ''}
}
provider = self.create_process_provider()
self.assertIsNone(provider.load())

def test_can_retrieve_via_process(self):
self.loaded_config['profiles'] = {
'default': {'credential_process': 'my-process'}
Expand Down