Skip to content

Commit

Permalink
Merge pull request #371 from kbase/adjust_repr_use
Browse files Browse the repository at this point in the history
363 python Server.py file adds extraneous quotes to error messages
  • Loading branch information
ialarmedalien authored Apr 23, 2024
2 parents 3a7e1b2 + ad8134e commit cedcfc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/java/us/kbase/templates/python_server.vm.properties
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ class JSONRPCServiceCustom(JSONRPCService):
newerr = JSONServerError()
newerr.trace = traceback.format_exc()
if len(e.args) == 1:
newerr.data = repr(e.args[0])
# repr adds single quotes around string arguments which is not what we want.
if type(e.args[0]) == str:
newerr.data = e.args[0]
else:
newerr.data = repr(e.args[0])
else:
newerr.data = repr(e.args)
raise newerr
Expand Down

0 comments on commit cedcfc2

Please sign in to comment.