Commit 3afa3927 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

from python2 to python3 > ok from command line

parent 61fa1721
......@@ -161,9 +161,10 @@ class JFlowServer (object):
value = func(*args, **kw)
cherrypy.response.headers["Content-Type"] = "application/json"
# if JSONP request
if "callback" in kw: return kw["callback"] + "(" + json.dumps(value, cls=JFlowJSONEncoder) + ")"
if "callback" in kw:
return ('%s(%s)' % (kw["callback"], json.dumps(value, cls=JFlowJSONEncoder))).encode('utf8')
# else return the JSON
else: return json.dumps(value)
else: return json.dumps(value, cls=JFlowJSONEncoder).encode('utf8')
return wrapper
def jsonify_workflow_status(self, workflow, init_to_zero=False):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment