aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authormartin f. krafft <madduck@madduck.net>2008-03-12 14:23:09 +0100
committerJoey Hess <joey@kodama.kitenet.net>2008-03-12 10:46:36 -0400
commit8a43597a00e561ecab541069661090947ae79899 (patch)
tree37087ba8129e8a2d80a11276e0612fc4e9beb413 /plugins
parent2fa9da9f1697346526ea667ae606a1521f40037f (diff)
downloadikiwiki-8a43597a00e561ecab541069661090947ae79899.tar
ikiwiki-8a43597a00e561ecab541069661090947ae79899.tar.gz
Handle SimpleXMLRPCDispatcher arg count change in Py2.5
SimpleXMLRPCDispatcher.__init__ takes 3 arguments instead of 1 since python 2.5, so we check for that with a hack, for I found no better way, other than catching a TypeError exception. Signed-off-by: martin f. krafft <madduck@madduck.net>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/rst b/plugins/rst
index abf835e2e..1d18dd775 100755
--- a/plugins/rst
+++ b/plugins/rst
@@ -61,8 +61,12 @@ def rpc_call(cmd, **kwargs):
class SimpleStdinOutXMLRPCHandler(SimpleXMLRPCDispatcher):
- def __init__(self):
- SimpleXMLRPCDispatcher.__init__(self)
+ def __init__(self, allow_none=False, encoding=None):
+ if SimpleXMLRPCDispatcher.__init__.func_code.co_argcount == 1:
+ # python2.4 and before only took one argument
+ SimpleXMLRPCDispatcher.__init__(self)
+ else:
+ SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
def process_request(self, req):
write(self._marshaled_dispatch(req))