http://bugs.python.org/issue6267

Incorrect exception handling for xmlrpclient retry
parent c2b71889
...@@ -1138,11 +1138,11 @@ class Transport: ...@@ -1138,11 +1138,11 @@ class Transport:
for i in (0, 1): for i in (0, 1):
try: try:
return self.single_request(host, handler, request_body, verbose) return self.single_request(host, handler, request_body, verbose)
except (socket.error, http.client.HTTPException) as e: except socket.error as e:
retry = (errno.ECONNRESET, if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED):
errno.ECONNABORTED, raise
http.client.BadStatusLine) #close after we sent request except http.client.BadStatusLine: #close after we sent request
if i or e[0] not in retry: if i:
raise raise
def single_request(self, host, handler, request_body, verbose=0): def single_request(self, host, handler, request_body, verbose=0):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment