Skip to content

Commit 543de69

Browse files
authored
Merge pull request #20826 from nsoranzo/fixes_from_cwl
Small improvements for running CWL tools
2 parents 4f41fe3 + 1a721fb commit 543de69

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/galaxy/webapps/galaxy/api/tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ def index(self, trans: GalaxyWebTransaction, **kwds):
361361
except exceptions.MessageException:
362362
raise
363363
except Exception:
364-
raise exceptions.InternalServerError("Error: Could not convert toolbox to dictionary")
364+
msg = "Error: Could not convert toolbox to dictionary"
365+
log.exception(msg)
366+
raise exceptions.InternalServerError(msg)
365367

366368
@expose_api_anonymous_and_sessionless
367369
def panel_views(self, trans: GalaxyWebTransaction, **kwds):

lib/galaxy_test/base/populators.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,12 +2808,10 @@ def _run_cwl_tool_job(
28082808

28092809
if os.path.exists(tool_id):
28102810
raw_tool_id = os.path.basename(tool_id)
2811-
index = self.dataset_populator._get("tools", data=dict(in_panel=False))
2812-
index.raise_for_status()
2813-
tools = index.json()
2814-
# In panels by default, so flatten out sections...
2815-
tool_ids = [itemgetter("id")(_) for _ in tools]
2816-
if raw_tool_id in tool_ids:
2811+
get_response = self.dataset_populator._get("tools", data=dict(tool_id=raw_tool_id))
2812+
get_response.raise_for_status()
2813+
tool_versions: list[str] = get_response.json()
2814+
if tool_versions:
28172815
galaxy_tool_id = raw_tool_id
28182816
else:
28192817
dynamic_tool = self.dataset_populator.create_tool_from_path(tool_id)

0 commit comments

Comments
 (0)