http://bugs.python.org/issue6267
Incorrect exception handling for xmlrp client retry
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index 160b61c..da3fb5a 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -1253,11 +1253,11 @@
for i in (0, 1):
try:
return self.single_request(host, handler, request_body, verbose)
- except (socket.error, httplib.HTTPException), e:
- retry = (errno.ECONNRESET,
- errno.ECONNABORTED,
- httplib.BadStatusLine) #close after we sent request
- if i or e[0] not in retry:
+ except socket.error, e:
+ if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED):
+ raise
+ except http.client.BadStatusLine: #close after we sent request
+ if i:
raise
##