summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpclib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-02 09:47:05 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-02 09:47:05 (GMT)
commitcc523fc53dd81cc166c99fa632cba204f5a14849 (patch)
tree83b77aefac97b4d166689c214db072f643809302 /Lib/xmlrpclib.py
parentdc113a8a06668c652895f6745808b1b04cbfc103 (diff)
downloadcpython-cc523fc53dd81cc166c99fa632cba204f5a14849.zip
cpython-cc523fc53dd81cc166c99fa632cba204f5a14849.tar.gz
cpython-cc523fc53dd81cc166c99fa632cba204f5a14849.tar.bz2
SF patch #834015: Remove imports of unused modules
(Contributed by George Yoshida.)
Diffstat (limited to 'Lib/xmlrpclib.py')
-rw-r--r--Lib/xmlrpclib.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index f06cfd7..2466e25 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -109,7 +109,7 @@ Exported classes:
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"
@@ -894,7 +894,7 @@ class _MultiCallMethod:
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'])
@@ -903,7 +903,7 @@ def MultiCallIterator(results):
else:
raise ValueError,\
"unexpected type in multicall result"
-
+
class MultiCall:
"""server -> a object used to boxcar method calls
@@ -920,14 +920,14 @@ class MultiCall:
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):
@@ -939,7 +939,7 @@ class MultiCall:
marshalled_list.append({'methodName' : name, 'params' : args})
return MultiCallIterator(self.__server.system.multicall(marshalled_list))
-
+
# --------------------------------------------------------------------
# convenience functions
@@ -1071,7 +1071,6 @@ def loads(data):
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()
@@ -1392,7 +1391,7 @@ class ServerProxy:
)
__str__ = __repr__
-
+
def __getattr__(self, name):
# magic method dispatcher
return _Method(self.__request, name)