aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-05-13 04:49:19 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-02 19:17:04 +0200
commitf45f51e3ae4fca24bc49474ca61c3262186c447d (patch)
tree92a2fff37766b450560a88570eedde5526f74f1a /qa
parentec45cc5e27668171b55271b0c735194c70e7da41 (diff)
Fix interrupted HTTP RPC connection workaround for Python 3.5+
Diffstat (limited to 'qa')
-rw-r--r--qa/rpc-tests/test_framework/authproxy.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py
index e5f7ab3656..95b2be658c 100644
--- a/qa/rpc-tests/test_framework/authproxy.py
+++ b/qa/rpc-tests/test_framework/authproxy.py
@@ -124,6 +124,11 @@ class AuthServiceProxy(object):
return self._get_response()
else:
raise
+ except BrokenPipeError:
+ # Python 3.5+ raises this instead of BadStatusLine when the connection was reset
+ self.__conn.close()
+ self.__conn.request(method, path, postdata, headers)
+ return self._get_response()
def __call__(self, *args):
AuthServiceProxy.__id_count += 1