Skip to content

Commit df476c1

Browse files
committed
fix: remove invalid default KAS
1 parent 355ed22 commit df476c1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/otdf_python/sdk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ def __exit__(self, exc_type, exc_val, exc_tb):
180180
class SDK(AbstractContextManager):
181181
def new_tdf_config(
182182
self, attributes: list[str] | None = None, **kwargs
183-
) -> "TDFConfig":
183+
) -> TDFConfig:
184184
"""
185185
Create a TDFConfig with default kas_info_list from the SDK's platform_url.
186-
Based on Java implementation.
187186
"""
188-
from otdf_python.config import TDFConfig, KASInfo
187+
from otdf_python.config import KASInfo
189188

190-
platform_url = self.platform_url or "https://default.kas.example.com"
189+
if self.platform_url is None:
190+
raise SDKException("Cannot create TDFConfig: SDK platform_url is not set.")
191191

192192
# Get use_plaintext setting - allow override via kwargs, fall back to SDK setting
193193
use_plaintext = kwargs.pop(
@@ -198,7 +198,7 @@ def new_tdf_config(
198198
# Include explicit port for HTTPS to match otdfctl behavior
199199
from urllib.parse import urlparse
200200

201-
parsed_url = urlparse(platform_url)
201+
parsed_url = urlparse(self.platform_url)
202202

203203
# Determine scheme and default port based on use_plaintext setting
204204
if use_plaintext:

0 commit comments

Comments
 (0)