Skip to content

Commit

Permalink
Assert if toolbox returns send tool before using it.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Oct 16, 2018
1 parent 24ed804 commit a35b686
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/galaxy/managers/cloud.py
Expand Up @@ -338,6 +338,14 @@ def send(self, trans, history_id, bucket_name, authz_id, dataset_ids=None, overw
}
incoming = (util.Params(args, sanitize=False)).__dict__
d2c = trans.app.toolbox.get_tool(SEND_TOOL, SEND_TOOL_VERSION)
if not d2c:
log.debug("Failed to get the `send` tool per user `{}` request.".format(trans.user.id))
failed.append(json.dumps(
{
"object": object_label,
"error": "Unable to get the `send` tool."
}))
continue
res = d2c.execute(trans, incoming, history=history)
job = res[0]
sent.append(json.dumps(
Expand Down

0 comments on commit a35b686

Please sign in to comment.