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

prepost: robust fallback on [time_stop] tag name with _ or space

parent 059aa2f1
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -361,6 +361,8 @@ def excel_stabcon(proot, fext='xlsx', pignore=None, pinclude=None, sheet=0, ...@@ -361,6 +361,8 @@ def excel_stabcon(proot, fext='xlsx', pignore=None, pinclude=None, sheet=0,
tags_dict['[case_id]'] = tags_dict['[Case id.]'] tags_dict['[case_id]'] = tags_dict['[Case id.]']
if '[time stop]' in tags_dict.keys(): if '[time stop]' in tags_dict.keys():
tags_dict['[time_stop]'] = tags_dict['[time stop]'] tags_dict['[time_stop]'] = tags_dict['[time stop]']
else:
tags_dict['[time stop]'] = tags_dict['[time_stop]']
try: try:
tags_dict['[turb_base_name]'] = tags_dict['[Turb base name]'] tags_dict['[turb_base_name]'] = tags_dict['[Turb base name]']
except KeyError: except KeyError:
......
...@@ -162,7 +162,10 @@ def variable_tag_func(master, case_id_short=False): ...@@ -162,7 +162,10 @@ def variable_tag_func(master, case_id_short=False):
mt['[log_dir]'] = 'logfiles/%s/' % dlc_case mt['[log_dir]'] = 'logfiles/%s/' % dlc_case
mt['[htc_dir]'] = 'htc/%s/' % dlc_case mt['[htc_dir]'] = 'htc/%s/' % dlc_case
mt['[case_id]'] = mt['[Case id.]'] mt['[case_id]'] = mt['[Case id.]']
mt['[time_stop]'] = mt['[time stop]'] try:
mt['[time_stop]'] = mt['[time stop]']
except KeyError:
mt['[time stop]'] = mt['[time_stop]']
mt['[turb_base_name]'] = mt['[Turb base name]'] mt['[turb_base_name]'] = mt['[Turb base name]']
mt['[DLC]'] = mt['[Case id.]'].split('_')[0][3:] mt['[DLC]'] = mt['[Case id.]'].split('_')[0][3:]
mt['[pbs_out_dir]'] = 'pbs_out/%s/' % dlc_case mt['[pbs_out_dir]'] = 'pbs_out/%s/' % dlc_case
......
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