diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index 2a150806d60b..6b06711c9c1f 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -258,13 +258,12 @@ def value_from_basic(self, value, app, ignore_errors=False): elif isinstance(value, MutableMapping) and value.get("__class__") == "UnvalidatedValue": return value["value"] # Delegate to the 'to_python' method - if ignore_errors: - try: - return self.to_python(value, app) - except Exception: - return value - else: + try: return self.to_python(value, app) + except Exception: + if not ignore_errors: + raise + return value def value_to_display_text(self, value) -> str: if is_runtime_value(value): diff --git a/lib/galaxy/tools/parameters/grouping.py b/lib/galaxy/tools/parameters/grouping.py index 26b4e171c0de..5a0e256fcbf2 100644 --- a/lib/galaxy/tools/parameters/grouping.py +++ b/lib/galaxy/tools/parameters/grouping.py @@ -161,9 +161,9 @@ def value_from_basic(self, value, app, ignore_errors=False): else: rval_dict[input.name] = input.value_from_basic(d[input.name], app, ignore_errors) rval.append(rval_dict) - except Exception as e: + except Exception: if not ignore_errors: - raise e + raise return rval def get_initial_value(self, trans, context): @@ -226,9 +226,9 @@ def value_from_basic(self, value, app, ignore_errors=False): for input in self.inputs.values(): if not ignore_errors or input.name in value: rval[input.name] = input.value_from_basic(value[input.name], app, ignore_errors) - except Exception as e: + except Exception: if not ignore_errors: - raise e + raise return rval def get_initial_value(self, trans, context): @@ -389,9 +389,9 @@ def value_from_basic(self, value, app, ignore_errors=False): else: rval_dict[input.name] = input.value_from_basic(d[input.name], app, ignore_errors) rval.append(rval_dict) - except Exception as e: + except Exception: if not ignore_errors: - raise e + raise return rval def get_file_count(self, trans, context): @@ -794,9 +794,9 @@ def value_from_basic(self, value, app, ignore_errors=False): # conditional's values dictionary. if not ignore_errors or input.name in value: rval[input.name] = input.value_from_basic(value[input.name], app, ignore_errors) - except Exception as e: + except Exception: if not ignore_errors: - raise e + raise return rval def get_initial_value(self, trans, context):