mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-01 00:10:44 +01:00
test: Remove python 3.4 workaround
This commit is contained in:
@@ -105,16 +105,9 @@ class AuthServiceProxy():
|
|||||||
try:
|
try:
|
||||||
self.__conn.request(method, path, postdata, headers)
|
self.__conn.request(method, path, postdata, headers)
|
||||||
return self._get_response()
|
return self._get_response()
|
||||||
except http.client.BadStatusLine as e:
|
|
||||||
if e.line == "''": # if connection was closed, try again
|
|
||||||
self.__conn.close()
|
|
||||||
self.__conn.request(method, path, postdata, headers)
|
|
||||||
return self._get_response()
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
except (BrokenPipeError, ConnectionResetError):
|
except (BrokenPipeError, ConnectionResetError):
|
||||||
# Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset
|
# Python 3.5+ raises BrokenPipeError when the connection was reset
|
||||||
# ConnectionResetError happens on FreeBSD with Python 3.4
|
# ConnectionResetError happens on FreeBSD
|
||||||
self.__conn.close()
|
self.__conn.close()
|
||||||
self.__conn.request(method, path, postdata, headers)
|
self.__conn.request(method, path, postdata, headers)
|
||||||
return self._get_response()
|
return self._get_response()
|
||||||
|
|||||||
Reference in New Issue
Block a user