From 43535d9647921ba586b0fc8c124255300511699d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Fri, 3 Jul 2009 23:23:50 +0000 Subject: [PATCH] http://bugs.python.org/issue6267 Incorrect exception handling for xmlrpclient retry --- Lib/xmlrpc/client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index 4b532efc950..9f72931ed07 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):