Changeset - 6274adc06988
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-12-21 01:07:41
marcin@python-works.com
fixed RPC call for api that was missing request id
1 file changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/api/__init__.py
Show inline comments
 
@@ -4,7 +4,7 @@
 
    ~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
    JSON RPC controller
 
    
 

	
 
    :created_on: Aug 20, 2011
 
    :author: marcink
 
    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
 
@@ -226,15 +226,20 @@ class JSONRPCController(WSGIController):
 
        if self._error is not None:
 
            raw_response = None
 

	
 
        response = dict(id=self._req_id, result=raw_response,
 
        response = dict(id=self._req_id, result=raw_response, 
 
                        error=self._error)
 

	
 
        try:
 
            return json.dumps(response)
 
        except TypeError, e:
 
            log.debug('Error encoding response: %s', e)
 
            return json.dumps(dict(result=None,
 
                                   error="Error encoding response"))
 
            return json.dumps(
 
                dict(
 
                    self._req_id,
 
                    result=None,
 
                    error="Error encoding response"
 
                )
 
            )
 

	
 
    def _find_method(self):
 
        """
0 comments (0 inline, 0 general)