Skip to content

Commit e018d03

Browse files
committed
use os.pathsep
1 parent a52d040 commit e018d03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bitsandbytes/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def generate_bug_report_information():
5656
print_header("LD_LIBRARY CUDA PATHS")
5757
if 'LD_LIBRARY_PATH' in os.environ:
5858
lib_path = os.environ['LD_LIBRARY_PATH'].strip()
59-
for path in set(lib_path.split(':' if not os.sep == "\\" else ";")):
59+
for path in set(lib_path.split(os.pathsep)):
6060
try:
6161
if isdir(path):
6262
print_header(f"{path} CUDA PATHS")

bitsandbytes/cuda_setup/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def is_cublasLt_compatible(cc):
198198
return has_cublaslt
199199

200200
def extract_candidate_paths(paths_list_candidate: str) -> Set[Path]:
201-
return {Path(ld_path) for ld_path in paths_list_candidate.split(";" if os.sep == "\\" else ":") if ld_path}
201+
return {Path(ld_path) for ld_path in paths_list_candidate.split(os.pathsep) if ld_path}
202202

203203

204204
def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]:

0 commit comments

Comments
 (0)