File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -136,10 +136,14 @@ def create(
136
136
)
137
137
138
138
if templates :
139
+ templates_path = path / "templates"
140
+ templates_path .mkdir (parents = True , exist_ok = True )
139
141
templates_abs : list [tuple [str , str ]] = []
140
142
for src , dst in templates :
141
143
incoming_template_file_path = Path (src )
142
- template_file_path = Path (path / incoming_template_file_path .name )
144
+ template_file_path = Path (
145
+ templates_path / incoming_template_file_path .name
146
+ )
143
147
shutil .copyfile (incoming_template_file_path , template_file_path )
144
148
templates_abs .append ((str (template_file_path .resolve ()), dst ))
145
149
storage ._write_transaction (
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ def migrate(path: Path) -> None:
12
12
if ert_config .ert_templates :
13
13
for experiment in path .glob ("experiments/*" ):
14
14
templates_abs : list [tuple [str , str ]] = []
15
+ templates_path = experiment / "templates"
16
+ templates_path .mkdir (parents = True , exist_ok = True )
15
17
for src , dst in ert_config .ert_templates :
16
18
incoming_template_file_path = Path (src )
17
- template_file_path = Path (path / incoming_template_file_path .name )
19
+ template_file_path = Path (
20
+ templates_path / incoming_template_file_path .name
21
+ )
18
22
shutil .copyfile (incoming_template_file_path , template_file_path )
19
23
templates_abs .append ((str (template_file_path .resolve ()), dst ))
20
24
with open (experiment / "templates.json" , "w" , encoding = "utf-8" ) as fout :
You can’t perform that action at this time.
0 commit comments