Skip to content

Commit 06b9741

Browse files
committed
Keep port as part of cache directory path
1 parent c908993 commit 06b9741

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

openml/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,8 @@ def get_cache_directory() -> str:
472472
473473
"""
474474
url_suffix = urlparse(server).netloc
475-
url_parts = url_suffix.split(".")[::-1]
476-
url_parts_no_port = [part.split(":")[0] for part in url_parts]
477-
reversed_url_suffix = os.sep.join(url_parts_no_port) # noqa: PTH118
475+
url_parts = url_suffix.replace(":", "_").split(".")[::-1]
476+
reversed_url_suffix = os.sep.join(url_parts) # noqa: PTH118
478477
return os.path.join(_root_cache_directory, reversed_url_suffix) # noqa: PTH118
479478

480479

0 commit comments

Comments
 (0)