Skip to content

Commit

Permalink
Update executable directory to look in current directory first, then …
Browse files Browse the repository at this point in the history
…package directory
  • Loading branch information
Austin Blevins committed Nov 15, 2023
1 parent e5431c4 commit 3fa3464
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ctem/ctem/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def __init__(self, param_file="ctem.in", isnew=True):
}

# Get the location of the CTEM executable
self.ctem_executable = Path(_pyfile).parent.parent.parent / "bin" / "CTEM"
self.ctem_executable = Path(currentdir) / "CTEM"
if not self.ctem_executable.exists():
print(f"CTEM driver not found at {self.ctem_executable}. Trying current directory.")
self.ctem_executable = Path(currentdir) / "CTEM"
print(f"CTEM driver not found at {self.ctem_executable}. Trying package directory..")
self.ctem_executable = Path(_pyfile).parent.parent.parent / "bin" / "CTEM"
if not self.ctem_executable.exists():
warnings.warn(f"Cannot find the CTEM driver {str(self.ctem_executable)}", stacklevel=2)
self.ctem_executable = None
Expand Down

0 comments on commit 3fa3464

Please sign in to comment.