#508367

From: Bernd Zeimetz <bernd@bzed.de>
Date: Sat, 28 Nov 2009 18:44:32 +0100
Subject: [PATCH] Work around some breakage in Python 2.5 and later.

See http://bugs.python.org/issue2703 for details.
---
 pycocumalib/CoCuMa_Server.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pycocumalib/CoCuMa_Server.py b/pycocumalib/CoCuMa_Server.py
index e257949..90aa813 100644
--- a/pycocumalib/CoCuMa_Server.py
+++ b/pycocumalib/CoCuMa_Server.py
@@ -19,6 +19,7 @@ import sys, signal
 import Preferences
 import debug
 import broadcaster
+import sys
 
 class XMLRPCServer(SocketServer.TCPServer, SimpleXMLRPCServer.SimpleXMLRPCDispatcher):
     """Overridden SimpleXMLRPCServer
@@ -29,7 +30,12 @@ class XMLRPCServer(SocketServer.TCPServer, SimpleXMLRPCServer.SimpleXMLRPCDispat
         self.logRequests = logRequests
         self.allow_reuse_address = 1
 
-        SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__(self)
+        # work around some breackage in Python 2.5 and later versions
+        if sys.version_info [1] > 4:
+            SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__(self, False, None)
+        else:
+            SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__(self)
+
         SocketServer.TCPServer.__init__(self, addr, requestHandler)
 
 class CoCuMa_Server:
