[Python-checkins] r73820 - python/branches/py3k/Lib/xmlrpc/client.py
kristjan.jonsson
python-checkins at python.org
Sat Jul 4 01:23:50 CEST 2009
Author: kristjan.jonsson
Date: Sat Jul 4 01:23:50 2009
New Revision: 73820
Log:
http://bugs.python.org/issue6267
Incorrect exception handling for xmlrpclient retry
Modified:
python/branches/py3k/Lib/xmlrpc/client.py
Modified: python/branches/py3k/Lib/xmlrpc/client.py
==============================================================================
--- python/branches/py3k/Lib/xmlrpc/client.py (original)
+++ python/branches/py3k/Lib/xmlrpc/client.py Sat Jul 4 01:23:50 2009
@@ -1138,11 +1138,11 @@
for i in (0, 1):
try:
return self.single_request(host, handler, request_body, verbose)
- except (socket.error, http.client.HTTPException) as e:
- retry = (errno.ECONNRESET,
- errno.ECONNABORTED,
- http.client.BadStatusLine) #close after we sent request
- if i or e[0] not in retry:
+ except socket.error as 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
def single_request(self, host, handler, request_body, verbose=0):
More information about the Python-checkins
mailing list