Skip to content

Commit

Permalink
Use str(omero.CmdError) and str(omero.cmd.ERR.name)
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Mar 6, 2024
1 parent 0a08a55 commit d328a0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omeroweb/webclient/webclient_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ def updatePermissions(self, group, permissions):
try:
cb = self.c.submit(command, loops=120)
except omero.CmdError as ex:
message = str(ex.err)
message = str(ex)
finally:
if cb:
cb.close(True)
Expand Down
4 changes: 2 additions & 2 deletions omeroweb/webgateway/marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ def graphResponseMarshal(conn, rsp):
rv = {}
if isinstance(rsp, omero.cmd.ERR):
rsp_params = ", ".join(["%s: %s" % (k, v) for k, v in rsp.parameters.items()])
rv["error"] = str(rsp.category)
rv["report"] = "%s %s" % (rsp.name, rsp_params)
rv["error"] = str(rsp.name)
rv["report"] = rsp_params
else:
included = rsp.responses[0].includedObjects
deleted = rsp.responses[0].deletedObjects
Expand Down

0 comments on commit d328a0c

Please sign in to comment.