ServerProxy Represents a logical connection to an XML-RPC server
- MultiCall Executor of boxcared xmlrpc requests
+ MultiCall Executor of boxcared xmlrpc requests
Boolean boolean wrapper to generate a "boolean" XML-RPC value
DateTime dateTime wrapper for an ISO 8601 string or time tuple or
localtime integer value to generate a "dateTime.iso8601"
def MultiCallIterator(results):
"""Iterates over the results of a multicall. Exceptions are
thrown in response to xmlrpc faults."""
-
+
for i in results:
if type(i) == type({}):
raise Fault(i['faultCode'], i['faultString'])
else:
raise ValueError,\
"unexpected type in multicall result"
-
+
class MultiCall:
"""server -> a object used to boxcar method calls
add_result, address = multicall()
"""
-
+
def __init__(self, server):
self.__server = server
self.__call_list = []
-
+
def __repr__(self):
return "<MultiCall at %x>" % id(self)
-
+
__str__ = __repr__
def __getattr__(self, name):
marshalled_list.append({'methodName' : name, 'params' : args})
return MultiCallIterator(self.__server.system.multicall(marshalled_list))
-
+
# --------------------------------------------------------------------
# convenience functions
If the XML-RPC packet represents a fault condition, this function
raises a Fault exception.
"""
- import sys
p, u = getparser()
p.feed(data)
p.close()
)
__str__ = __repr__
-
+
def __getattr__(self, name):
# magic method dispatcher
return _Method(self.__request, name)