Skip to content

Commit

Permalink
reverted some of the falsey string expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcocdawc committed Nov 21, 2024
1 parent 773e270 commit 783d04d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/kbe/pbe.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ def __init__(
jobid = ""
if be_var.CREATE_SCRATCH_DIR:
jobid = os.environ.get("SLURM_JOB_ID", "")
if be_var.SCRATCH:
if be_var.SCRATCH != "":
os.system("mkdir " + be_var.SCRATCH + str(jobid))
if not jobid:
if jobid == "":
self.eri_file = be_var.SCRATCH + eri_file
if cderi:
self.cderi = be_var.SCRATCH + cderi
Expand Down
4 changes: 2 additions & 2 deletions src/molbe/mbe.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ def __init__(
jobid = ""
if be_var.CREATE_SCRATCH_DIR:
jobid = os.environ.get("SLURM_JOB_ID", "")
if be_var.SCRATCH:
if be_var.SCRATCH != "":
self.scratch_dir = be_var.SCRATCH + str(jobid)
os.system("mkdir -p " + self.scratch_dir)
else:
self.scratch_dir = None
if not jobid:
if jobid == "":
self.eri_file = be_var.SCRATCH + eri_file
else:
self.eri_file = self.scratch_dir + "/" + eri_file
Expand Down
4 changes: 2 additions & 2 deletions src/molbe/ube.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ def __init__(
jobid = ""
if be_var.CREATE_SCRATCH_DIR:
jobid = os.environ.get("SLURM_JOB_ID", "")
if be_var.SCRATCH:
if be_var.SCRATCH != "":
self.scratch_dir = be_var.SCRATCH + str(jobid)
os.system("mkdir -p " + self.scratch_dir)
else:
self.scratch_dir = None
if not jobid:
if jobid == "":
self.eri_file = be_var.SCRATCH + eri_file
else:
self.eri_file = self.scratch_dir + "/" + eri_file
Expand Down

0 comments on commit 783d04d

Please sign in to comment.