Show More
@@ -4,7 +4,7 | |||
|
4 | 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
5 | 5 | |
|
6 | 6 | JSON RPC controller |
|
7 | ||
|
7 | ||
|
8 | 8 | :created_on: Aug 20, 2011 |
|
9 | 9 | :author: marcink |
|
10 | 10 | :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> |
@@ -226,15 +226,20 class JSONRPCController(WSGIController): | |||
|
226 | 226 | if self._error is not None: |
|
227 | 227 | raw_response = None |
|
228 | 228 | |
|
229 | response = dict(id=self._req_id, result=raw_response, | |
|
229 | response = dict(id=self._req_id, result=raw_response, | |
|
230 | 230 | error=self._error) |
|
231 | 231 | |
|
232 | 232 | try: |
|
233 | 233 | return json.dumps(response) |
|
234 | 234 | except TypeError, e: |
|
235 | 235 | log.debug('Error encoding response: %s', e) |
|
236 |
return json.dumps( |
|
|
237 | error="Error encoding response")) | |
|
236 | return json.dumps( | |
|
237 | dict( | |
|
238 | self._req_id, | |
|
239 | result=None, | |
|
240 | error="Error encoding response" | |
|
241 | ) | |
|
242 | ) | |
|
238 | 243 | |
|
239 | 244 | def _find_method(self): |
|
240 | 245 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now