diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-09-29 15:02:08 +0000 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-09-29 15:02:08 +0000 |
| commit | 1d28faf9e94fcf240ece7336d61ec297b064bc37 (patch) | |
| tree | e8b329dc0efd367ce684808bb19b0b588aa65529 | |
| parent | Merge #8835: [qa] nulldummy.py: Don't run unused code (diff) | |
| download | discoin-1d28faf9e94fcf240ece7336d61ec297b064bc37.tar.xz discoin-1d28faf9e94fcf240ece7336d61ec297b064bc37.zip | |
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
| -rw-r--r-- | qa/rpc-tests/test_framework/authproxy.py | 5 |
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 f5e0be20d..fd7f32b5c 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -130,8 +130,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() |