Skip to content

Commit 034c541

Browse files
committed
ODSC-ODSC-36795: set_auth fails() on resource_principal in example notebook
1 parent 2b21579 commit 034c541

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

ads/ads_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "2.7.0"
2+
"version": "2.7.1"
33
}

ads/common/auth.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ def set_auth(
150150

151151
auth_state.oci_config = config
152152
auth_state.oci_key_profile = profile
153-
if os.path.exists(os.path.expanduser(oci_config_location)):
154-
auth_state.oci_config_path = oci_config_location
155-
else:
156-
raise ValueError(
157-
f"{oci_config_location} path does not exist, please provide existing path to config file."
158-
)
153+
if auth == AuthType.API_KEY:
154+
if os.path.exists(os.path.expanduser(oci_config_location)):
155+
auth_state.oci_config_path = oci_config_location
156+
else:
157+
raise ValueError(
158+
f"{oci_config_location} path does not exist, please provide existing path to config file."
159+
)
159160

160161
auth_state.oci_signer = signer
161162
auth_state.oci_signer_callable = signer_callable

0 commit comments

Comments
 (0)