Skip to content

Commit

Permalink
move registering the exception
Browse files Browse the repository at this point in the history
then it might be clearer what's going on here
  • Loading branch information
bernt-matthias committed Apr 2, 2024
1 parent e1ec2c8 commit 1a545ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/galaxy/tool_util/verify/interactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@ def register_exception(e: Exception):
outfile = output_dict["value"]
attributes = output_dict["attributes"]
output_testdef = Bunch(name=name, outfile=outfile, attributes=attributes)
output_data = None
try:
output_data = data_list[name]
except (TypeError, KeyError):
Expand All @@ -1551,7 +1552,8 @@ def register_exception(e: Exception):
else:
output_data = data_list[len(data_list) - len(testdef.outputs) + output_index]
except IndexError:
pass
error = AssertionError(f"Tool did not produce an output with name '{name}' (or at index {output_index})")
register_exception(error)
if output_data:
try:
galaxy_interactor.verify_output(
Expand All @@ -1565,9 +1567,6 @@ def register_exception(e: Exception):
)
except Exception as e:
register_exception(e)
else:
error = AssertionError(f"Tool did not produce an output with name '{name}' (or at index {output_index})")
register_exception(error)

other_checks = {
"command_line": "Command produced by the job",
Expand Down

0 comments on commit 1a545ae

Please sign in to comment.