Skip to content

Commit d18780e

Browse files
author
Ralf Schlatterbeck
committed
Small fix for CGI-handling of XMLRPC requests for python2.4...
...this worked only for 2.5 and beyond due to a change in the xmlrpc interface in python
1 parent 657627d commit d18780e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Fixes:
1717
We now issue a warning during export if the limit is too small and use
1818
the csv_field_size configuration during import to set the limit for
1919
the csv module.
20+
- Small fix for CGI-handling of XMLRPC requests for python2.4, this
21+
worked only for 2.5 and beyond due to a change in the xmlrpc interface
22+
in python
2023

2124
2009-08-10 1.4.9 (r4346)
2225

roundup/xmlrpc.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ class RoundupDispatcher(SimpleXMLRPCDispatcher):
165165
def __init__(self, db, actions, translator,
166166
allow_none=False, encoding=None):
167167

168-
SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
168+
try:
169+
# python2.5 and beyond
170+
SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
171+
except TypeError:
172+
# python2.4
173+
SimpleXMLRPCDispatcher.__init__(self)
169174
self.register_instance(RoundupInstance(db, actions, translator))
170175

171176

0 commit comments

Comments
 (0)