mirror of
https://github.com/certbot/certbot.git
synced 2026-04-21 22:26:59 -04:00
[#4535] - Unwrap max retries exceeded errors
This commit is contained in:
parent
1e71ff5377
commit
959d72feb0
2 changed files with 5 additions and 5 deletions
|
|
@ -651,7 +651,7 @@ class ClientNetwork(object): # pylint: disable=too-many-instance-attributes
|
|||
raise # pragma: no cover
|
||||
else:
|
||||
host, path, err_no, err_msg = m.groups()
|
||||
raise ValueError("Requesting {0}{1}: {2}{3}".format(host, path, err_no, err_msg))
|
||||
raise ValueError("Requesting {0}{1}: {2}".format(host, path, err_msg))
|
||||
|
||||
# If content is DER, log the base64 of it instead of raw bytes, to keep
|
||||
# binary data out of the logs.
|
||||
|
|
|
|||
|
|
@ -632,19 +632,19 @@ class ClientNetworkTest(unittest.TestCase):
|
|||
except ValueError as y:
|
||||
if "linux" in sys.platform:
|
||||
self.assertEqual("Requesting localhost/nonexistent: "
|
||||
"[Errno 111] Connection refused", str(y))
|
||||
"Connection refused", str(y))
|
||||
else: #pragma: no cover
|
||||
self.assertEqual("Requesting localhost/nonexistent: "
|
||||
"[Errno 61] Connection refused", str(y))
|
||||
"Connection refused", str(y))
|
||||
|
||||
# Python 3
|
||||
except requests.exceptions.ConnectionError as z: #pragma: no cover
|
||||
if "linux" in sys.platform:
|
||||
self.assertEqual("('Connection aborted.', "
|
||||
"error(111, 'Connection refused'))", str(z))
|
||||
"error('Connection refused'))", str(z))
|
||||
else: #pragma: no cover
|
||||
self.assertEqual("('Connection aborted.', "
|
||||
"error(61, 'Connection refused'))", str(z))
|
||||
"error('Connection refused'))", str(z))
|
||||
|
||||
class ClientNetworkWithMockedResponseTest(unittest.TestCase):
|
||||
"""Tests for acme.client.ClientNetwork which mock out response."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue