Skip to content

Commit

Permalink
Fix a path issue with windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jbellister-slac committed Feb 9, 2022
1 parent 1696af6 commit a435c81
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pydm/utilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,14 @@ def find_file(fname, base_path=None, mode=None, extra_path=None):
if pydm_search_path:
x_path.extend(pydm_search_path.split(os.pathsep))

# f_ext = ''.join(_extensions(fname))

for idx, path in enumerate(x_path):
x_path[idx] = os.path.expanduser(os.path.expandvars(path))

root, ext = os.path.splitext(fname)

# loop through the possible screen file extensions
for e in _screen_file_extensions(ext):
# file_path = which(f"{root}{e}", mode=mode, pathext=f_ext, extra_path=x_path)
file_path = which(f"{root}{e}", mode=mode, extra_path=x_path)
file_path = which(str(root) + str(e), mode=mode, pathext=e, extra_path=x_path)
if file_path is not None:
break # pick the first screen file found

Expand Down

0 comments on commit a435c81

Please sign in to comment.