Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Sep 4, 2024
1 parent a8cb6c2 commit b8b671f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions numba_cuda/numba/cuda/cudadrv/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2691,19 +2691,19 @@ def add_file_guess_ext(self, path_or_code):
object represents a file already in memory.
"""
if isinstance(path_or_code, str):
ext = pathlib.Path(path_or_code).suffix.lstrip('.')
ext = pathlib.Path(path_or_code).suffix
if ext == '':
raise RuntimeError(
"Don't know how to link file with no extension"
)
elif ext == '.cu':
self.add_cu_file(path_or_code)
else:
kind = FILE_EXTENSION_MAP.get(ext, None)
kind = FILE_EXTENSION_MAP.get(ext.lstrip('.'), None)
if kind is None:
raise RuntimeError(
"Don't know how to link file with extension "
f".{ext}"
f"{ext}"
)
self.add_file(path_or_code, kind)
return
Expand Down

0 comments on commit b8b671f

Please sign in to comment.