]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - plugins/rst
Provide XML-RPC proxy abstraction for Python plugins
[git.ikiwiki.info.git] / plugins / rst
index abf835e2ed01e297679bda0475a83cd5d1bf4756..a719e18ba7338f025e174500dd2facfcf53ece50 100755 (executable)
@@ -61,8 +61,13 @@ def rpc_call(cmd, **kwargs):
 
 class SimpleStdinOutXMLRPCHandler(SimpleXMLRPCDispatcher):
 
 
 class SimpleStdinOutXMLRPCHandler(SimpleXMLRPCDispatcher):
 
-    def __init__(self):
-        SimpleXMLRPCDispatcher.__init__(self)
+    def __init__(self, allow_none=False, encoding=None):
+        # see http://bugs.debian.org/470645
+        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))
 
     def process_request(self, req):
         write(self._marshaled_dispatch(req))