Skip to content

Commit

Permalink
fix odir exposure
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Aug 23, 2023
1 parent 1aba39c commit 24a9f3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pythena_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,18 @@ def run(self, odir_input, plot):
cmd += '%s=%s ' % (k, self.input[k].text())

print(cmd)
# create odir (including intermediaries if needed)
odir = odir_input.text()
os.makedirs(odir,exist_ok=True)
hname = f'{odir_input.text()}/history'
with open(hname, 'w') as file:
file.write(cmd)
file.write(cmd)

if plot:
if not path.exists(athena):
print('Athena not found\nExiting')
# open the plot in a subprocess
# remove the forward slash at the end if there is one
odir = odir_input.text()
# create odir (including intermediaries if needed)
os.makedirs(odir,exist_ok=True)
if odir[-1] == '/':
odir = odir[:-1]
# remove the hst file since it always gets appended to
Expand Down

0 comments on commit 24a9f3d

Please sign in to comment.