summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc/client.py
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2009-07-03 23:23:50 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2009-07-03 23:23:50 (GMT)
commit43535d9647921ba586b0fc8c124255300511699d (patch)
tree80165a24ab85b2200d82a9536125b5ea9fda1f3e /Lib/xmlrpc/client.py
parentc2b71889951b0098350757d96d146411991d43df (diff)
downloadcpython-43535d9647921ba586b0fc8c124255300511699d.zip
cpython-43535d9647921ba586b0fc8c124255300511699d.tar.gz
cpython-43535d9647921ba586b0fc8c124255300511699d.tar.bz2
http://bugs.python.org/issue6267
Incorrect exception handling for xmlrpclient retry
Diffstat (limited to 'Lib/xmlrpc/client.py')
-rw-r--r--Lib/xmlrpc/client.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index 4b532ef..9f72931 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -1138,11 +1138,11 @@ class Transport:
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):