Skip to content
Merged
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 alibabacloud_credentials/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.5"
__version__ = "1.0.6"
12 changes: 8 additions & 4 deletions alibabacloud_credentials/provider/cli_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ def _find_source_oauth_profile(config: dict, profile_name: str) -> dict:

if profile.get('mode') == 'OAuth':
return profile
elif source_profile := profile.get('source_profile'):
return _find_source_oauth_profile(config, source_profile)
else:
source_profile = profile.get('source_profile')
if source_profile:
return _find_source_oauth_profile(config, source_profile)

raise CredentialException(f"unable to get OAuth profile with name '{profile_name}' from cli credentials file.")

Expand Down Expand Up @@ -563,8 +565,10 @@ def _find_source_oauth_profile(config: dict, profile_name: str) -> dict:

if profile.get('mode') == 'OAuth':
return profile
elif source_profile := profile.get('source_profile'):
return _find_source_oauth_profile(config, source_profile)
else:
source_profile = profile.get('source_profile')
if source_profile:
return _find_source_oauth_profile(config, source_profile)

raise CredentialException(f"unable to get OAuth profile with name '{profile_name}' from cli credentials file.")

Expand Down
Loading