From 400f439f4f91f8d1fc80b4d20dcd43b12c9237bf Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Thu, 12 May 2016 19:13:22 +0200 Subject: [PATCH] prepost.Simulations: add optional kwarg for error log save path --- wetb/prepost/Simulations.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py index 1223662b..0cc96d87 100755 --- a/wetb/prepost/Simulations.py +++ b/wetb/prepost/Simulations.py @@ -1047,7 +1047,8 @@ def launch(cases, runmethod='local', verbose=False, copyback_turb=True, 'linux-script, windows-script, local-ram, none' raise ValueError(msg) -def post_launch(cases, save_iter=False, silent=False, suffix=None): +def post_launch(cases, save_iter=False, silent=False, suffix=None, + path_errorlog=None): """ Do some basics checks: do all launched cases have a result and LOG file and are there any errors in the LOG files? @@ -1153,7 +1154,10 @@ def post_launch(cases, save_iter=False, silent=False, suffix=None): # but put in one level up, so in the logfiles folder directly errorlogs.ResultFile = sim_id + '_ErrorLog.csv' # save the log file analysis in the run_dir instead of the log_dir - errorlogs.PathToLogs = run_dir# + log_dir + if path_errorlog is None: + errorlogs.PathToLogs = run_dir# + log_dir + else: + errorlogs.PathToLogs = path_errorlog errorlogs.save(suffix=suffix) # save the error LOG list, this is redundant, since it already exists in -- GitLab