X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8a8e54f3f61721b40c60712c4c5c0cefd049502e..6c87fdc5624ea6fb2dd4e8ed940f799ef0e618b9:/plugins/proxy.py diff --git a/plugins/proxy.py b/plugins/proxy.py index 41cc45700..d70a967a5 100755 --- a/plugins/proxy.py +++ b/plugins/proxy.py @@ -159,11 +159,11 @@ class _IkiWikiExtPluginXMLRPCHandler(object): xml = _xmlrpc_client.dumps(sum(kwargs.items(), args), cmd) self._debug_fn( "calling ikiwiki procedure `{0}': [{1}]".format(cmd, xml)) - _IkiWikiExtPluginXMLRPCHandler._write(out_fd, xml) + _IkiWikiExtPluginXMLRPCHandler._write(out_fd, xml.encode('utf8')) self._debug_fn('reading response from ikiwiki...') - xml = _IkiWikiExtPluginXMLRPCHandler._read(in_fd) + xml = _IkiWikiExtPluginXMLRPCHandler._read(in_fd).decode('utf8') self._debug_fn( 'read response to procedure {0} from ikiwiki: [{1}]'.format( cmd, xml)) @@ -175,7 +175,7 @@ class _IkiWikiExtPluginXMLRPCHandler(object): data = _xmlrpc_client.loads(xml)[0][0] self._debug_fn( 'parsed data from response to procedure {0}: [{1}]'.format( - cmd, data)) + cmd, repr(data))) return data def handle_rpc(self, in_fd, out_fd): @@ -250,7 +250,7 @@ class IkiWikiProcedureProxy(object): # kwargs = dict([args[i:i+2] for i in xrange(1, len(args), 2)]) ret = function(self, *args) self._debug_fn( - "{0} hook `{1}' returned: [{2}]".format(type, name, ret)) + "{0} hook `{1}' returned: [{2}]".format(type, name, repr(ret))) if ret == IkiWikiProcedureProxy._IKIWIKI_NIL_SENTINEL: raise InvalidReturnValue( 'hook functions are not allowed to return {0}'.format(