django.utils.six.moves.xmlrpc_client.loads

Here are the examples of the python api django.utils.six.moves.xmlrpc_client.loads taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: patchwork
Source File: xmlrpc.py
View license
    def _marshaled_dispatch(self, request):
        try:
            params, method = six.moves.xmlrpc_client.loads(request.body)

            response = self._dispatch(request, method, params)
            # wrap response in a singleton tuple
            response = (response,)
            response = self.dumps(response, methodresponse=1)
        except six.moves.xmlrpc_client.Fault as fault:
            response = self.dumps(fault)
        except:
            # report exception back to server
            response = self.dumps(
                six.moves.xmlrpc_client.Fault(1,
                        '%s:%s' % (sys.exc_info()[0], sys.exc_info()[1])),
            )

        return response