diff options
author | Daniel Nephin <dnephin@gmail.com> | 2016-07-22 10:57:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 10:57:41 -0400 |
commit | 619bf4c4df4b840b6f325245c54758fa5a645037 (patch) | |
tree | 55b3e6b019c89df5bb0052ed8d34d6795caaa066 /compose/cli | |
parent | 10749e187ca5bf4243b76c90842a6bdf4c0e64a6 (diff) | |
parent | 4207d43b85c1c6b77bad82349b17fd060fa2abf4 (diff) |
Merge pull request #3705 from aanand/fix-timeout-message
Fix timeout value in error message
Diffstat (limited to 'compose/cli')
-rw-r--r-- | compose/cli/docker_client.py | 4 | ||||
-rw-r--r-- | compose/cli/errors.py | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/compose/cli/docker_client.py b/compose/cli/docker_client.py index 3e0873c4..bed6be79 100644 --- a/compose/cli/docker_client.py +++ b/compose/cli/docker_client.py @@ -45,10 +45,6 @@ def docker_client(environment, version=None, tls_config=None, host=None, Returns a docker-py client configured using environment variables according to the same logic as the official Docker client. """ - if 'DOCKER_CLIENT_TIMEOUT' in environment: - log.warn("The DOCKER_CLIENT_TIMEOUT environment variable is deprecated. " - "Please use COMPOSE_HTTP_TIMEOUT instead.") - try: kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version) except TLSParameterError: diff --git a/compose/cli/errors.py b/compose/cli/errors.py index 89a7a949..5af3ede9 100644 --- a/compose/cli/errors.py +++ b/compose/cli/errors.py @@ -13,7 +13,6 @@ from requests.exceptions import SSLError from requests.packages.urllib3.exceptions import ReadTimeoutError from ..const import API_VERSION_TO_ENGINE_VERSION -from ..const import HTTP_TIMEOUT from .utils import call_silently from .utils import is_docker_for_mac_installed from .utils import is_mac @@ -47,7 +46,7 @@ def handle_connection_errors(client): raise ConnectionError() except RequestsConnectionError as e: if e.args and isinstance(e.args[0], ReadTimeoutError): - log_timeout_error() + log_timeout_error(client.timeout) raise ConnectionError() exit_with_error(get_conn_error_message(client.base_url)) except APIError as e: @@ -58,13 +57,13 @@ def handle_connection_errors(client): raise ConnectionError() -def log_timeout_error(): +def log_timeout_error(timeout): log.error( "An HTTP request took too long to complete. Retry with --verbose to " "obtain debug information.\n" "If you encounter this issue regularly because of slow network " "conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher " - "value (current value: %s)." % HTTP_TIMEOUT) + "value (current value: %s)." % timeout) def log_api_error(e, client_version): |