Skip to content
Snippets Groups Projects
Commit d766dda2 authored by Michael Langguth's avatar Michael Langguth
Browse files

Some fixes in error-handling of config_preprocess_step1.py.

parent d1f9bcb6
Branches michael_issue#103_postprocess_flexible_number_samples
Tags
No related merge requests found
Pipeline #68042 passed
...@@ -247,13 +247,13 @@ class Config_Preprocess1(Config_runscript_base): ...@@ -247,13 +247,13 @@ class Config_Preprocess1(Config_runscript_base):
if not status: if not status:
inds_bad = [i for i, e in enumerate(check_vars) if e] # np.where(~np.array(check_vars))[0] inds_bad = [i for i, e in enumerate(check_vars) if e] # np.where(~np.array(check_vars))[0]
if not silent: if not silent:
print("%{0}: The following comma-separated elements are unknown variables:".format(method_name)) print("%{0}: The following comma-separated elements are unknown variables:".format(method))
for ind in inds_bad: for ind in inds_bad:
print(vars_list[ind]) print(vars_list[ind])
return status return status
if not (len(check_vars) == Config_Preprocess1.nvars or len(check_vars) == 1): if not (len(check_vars) == Config_Preprocess1.nvars or len(check_vars) == 1):
if not silent: print("%{0}: Unexpected number of variables passed.".method(method)) if not silent: print("%{0}: Unexpected number of variables passed ({1} vs. {2}).".format(method, len(check_vars), Config_Preprocess1.nvars))
status = False status = False
return status return status
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment