Skip to content

Commit 9056d73

Browse files
committed
fix
1 parent a3879bf commit 9056d73

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

databricks/sdk/config.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ def __init__(self,
121121
self._set_inner_config(kwargs)
122122
self._load_from_env()
123123
self._known_file_config_loader()
124-
updated_host = _fix_host_if_needed(self.host)
125-
if updated_host:
126-
self.host = updated_host
124+
self._fix_host_if_needed()
127125
self._validate()
128126
self.init_auth()
129127
self._init_product(product, product_version)
@@ -255,7 +253,7 @@ def with_user_agent_extra(self, key: str, value: str) -> 'Config':
255253

256254
@property
257255
def oidc_endpoints(self) -> Optional[OidcEndpoints]:
258-
self.host = fix_host_if_needed(self.host)
256+
self._fix_host_if_needed()
259257
if not self.host:
260258
return None
261259
if self.is_azure and self.azure_client_id:
@@ -336,6 +334,11 @@ def attributes(cls) -> Iterable[ConfigAttribute]:
336334
cls._attributes = attrs
337335
return cls._attributes
338336

337+
def _fix_host_if_needed(self):
338+
updated_host = _fix_host_if_needed(self.host)
339+
if updated_host:
340+
self.host = updated_host
341+
339342
def load_azure_tenant_id(self):
340343
"""[Internal] Load the Azure tenant ID from the Azure Databricks login page.
341344

0 commit comments

Comments
 (0)