[Python-checkins] r73821 - python/trunk/Lib/xmlrpclib.py
kristjan.jonsson
python-checkins at python.org
Sat Jul 4 01:26:02 CEST 2009
Author: kristjan.jonsson
Date: Sat Jul 4 01:26:02 2009
New Revision: 73821
Log:
http://bugs.python.org/issue6267
Incorrect exception handling for xmlrp client retry
Modified:
python/trunk/Lib/xmlrpclib.py
Modified: python/trunk/Lib/xmlrpclib.py
==============================================================================
--- python/trunk/Lib/xmlrpclib.py (original)
+++ python/trunk/Lib/xmlrpclib.py Sat Jul 4 01:26:02 2009
@@ -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
##
More information about the Python-checkins
mailing list