Skip to content

Commit

Permalink
avoid overwriting existing job
Browse files Browse the repository at this point in the history
  • Loading branch information
maurov committed Aug 1, 2024
1 parent 7b49de7 commit 5d449e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions larch/xrd/struct2xas.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,9 @@ def make_input_fdmnes(
try:
os.makedirs(self.outdir, mode=0o755)
except FileExistsError:
pass
errmsg = f"`job{job.num}` already exists -> use `newjob` or remove it"
logger.error(errmsg)
raise FileExistsError(errmsg)

# Write the input file.
fnout = os.path.join(self.outdir, "job_inp.txt")
Expand All @@ -1001,10 +1003,8 @@ def make_sbatch(self, template: str, **kwargs):
Arguments
---------
template: str
path to the SBATCH template file
**kwargs
keyword arguments to be replaced in the template file
Expand Down

0 comments on commit 5d449e8

Please sign in to comment.