Skip to content

Commit

Permalink
Add assertion message
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Jan 29, 2024
1 parent 237626e commit 9a682d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/galaxy/tool_util/toolbox/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,9 @@ def _load_integrated_tool_panel_keys(self):
section = ToolSection(elem)
for section_elem in elem:
section_id = section_elem.get("id")
assert section_id
assert (
section_id
), f"Element '{etree.tostring(section_elem, encoding='unicode')}' did not specify 'id' attribute"
if section_elem.tag == "tool":
section.elems.stub_tool(section_id)
elif section_elem.tag == "workflow":
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ def parse_resource_parameters(resource_param_file):
resource_definitions_root = resource_definitions.getroot()
for parameter_elem in resource_definitions_root.findall("param"):
name = parameter_elem.get("name")
resource_parameters[name] = etree.tostring(parameter_elem)
resource_parameters[name] = etree.tostring(parameter_elem, encoding="unicode")

return resource_parameters

Expand Down

0 comments on commit 9a682d4

Please sign in to comment.