aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/authproxy.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-09-29 15:02:08 +0000
committerMarcoFalke <falke.marco@gmail.com>2016-10-03 10:57:04 +0200
commit31ab2f862ad48e89314611faa0debc916317cb16 (patch)
tree93faefbeda3a3d1a37a0287b438a535f78080def /qa/rpc-tests/test_framework/authproxy.py
parenteb18cc1272e1f29b2caccf08aedee3de6fc3c437 (diff)
test: Avoid ConnectionResetErrors during RPC tests
This is necessary on FreeBSD and MacOSX, at least. See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213 Github-Pull: #8839 Rebased-From: 1d28faf9e94fcf240ece7336d61ec297b064bc37
Diffstat (limited to 'qa/rpc-tests/test_framework/authproxy.py')
-rw-r--r--qa/rpc-tests/test_framework/authproxy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py
index d095a56ce7..1a94bf5fe9 100644
--- a/qa/rpc-tests/test_framework/authproxy.py
+++ b/qa/rpc-tests/test_framework/authproxy.py
@@ -126,8 +126,9 @@ class AuthServiceProxy(object):
return self._get_response()
else:
raise
- except BrokenPipeError:
- # Python 3.5+ raises this instead of BadStatusLine when the connection was reset
+ except (BrokenPipeError,ConnectionResetError):
+ # Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset
+ # ConnectionResetError happens on FreeBSD with Python 3.4
self.__conn.close()
self.__conn.request(method, path, postdata, headers)
return self._get_response()