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

Some minor changes to the doc-strings of config_utils.py and generate_runscript.py.

parent 496662e7
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ def main():
# get workflow step by keyboard interaction
target_runscript_req = "Please enter the name of the workflow step for which a runscript should be created:"
target_runscript_err = ValueError("Workflow step is unknown. Please select one of the known listed above")
target_runscript_err = ValueError("Please select one of the known listed above.")
def check_target_runscript(runscript_name, silent=False):
if not runscript_name in known_wrkflw_steps:
......
......@@ -267,6 +267,7 @@ class Config_runscript_base:
:param console_str: Request printed to the console
:param check_input: function returning boolean which needs to be passed by input from keyboard interaction.
Must have two arguments with the latter being an optional bool called silent.
:param err: Error to be raised in case of failure
:param ntries: maximum number of tries (default: 1)
:param test_arg: test argument to check_input-function (default: "xxx")
:param prefix2arg: optional prefix that might be added to string from keyboard-interaction before it enters
......@@ -289,9 +290,9 @@ class Config_runscript_base:
pass
except:
raise Exception("%{0}: Cannot approve check_input-argument to be proper.".format(method_name))
if not isinstance(err,BaseException):
raise ValueError("%{0}: err_str-argument must be an instance of BaseException!".format(method_name))
if not isinstance(ntries,int) and ntries <= 1:
if not isinstance(err, BaseException):
raise ValueError("%{0}: err-argument must be an instance of BaseException!".format(method_name))
if not isinstance(ntries, int) and ntries <= 1:
raise ValueError("%{0}: ntries-argument must be an integer greater equal 1!".format(method_name))
attempt = 0
......
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