mirror of
https://github.com/python/cpython.git
synced 2026-01-28 10:12:20 +00:00
Incorrect exception handling for xmlrp client retry
This commit is contained in:
parent
b5faac73a4
commit
f83648ef48
1 changed files with 5 additions and 5 deletions
|
|
@ -1253,11 +1253,11 @@ def request(self, host, handler, request_body, verbose=0):
|
|||
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
|
||||
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue