Skip to content
Snippets Groups Projects
Commit e07c0fa3 authored by David Verelst's avatar David Verelst
Browse files

GenerateHydro: create hydro dir if not exists when writing hydro file

parent ab8e671a
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,9 @@ class hydro_input(object): ...@@ -66,6 +66,9 @@ class hydro_input(object):
if os.path.exists(file_path): if os.path.exists(file_path):
pass pass
else: else:
# create directory if non existing
if not os.path.exists(folder):
os.makedirs(folder)
FILE = open(file_path,'w+') FILE = open(file_path,'w+')
line1 = 'begin wkin_input ;' line1 = 'begin wkin_input ;'
line2 = 'wavetype %d ;' %self.waveno line2 = 'wavetype %d ;' %self.waveno
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment