From 93fcdc60acd5eb0743f7b80105cbb804197153d1 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 27 May 2014 16:19:50 +0200 Subject: [PATCH] dont wrap errors --- oml/oxtornado.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oml/oxtornado.py b/oml/oxtornado.py index 35e03c7..9215e54 100644 --- a/oml/oxtornado.py +++ b/oml/oxtornado.py @@ -113,7 +113,9 @@ class ApiHandler(tornado.web.RequestHandler): return response = yield tornado.gen.Task(api_task, self._app, self.request) - response = json_dumps(json_response(response)) + if not 'status' in response: + response = json_response(response) + response = json_dumps(response) self.set_header('Content-Type', 'application/json') self.write(response)