Skip to content

Commit bad113b

Browse files
authored
Merge pull request #7617 from readthedocs/humitos/catch-timeout-docker-exception
Catch `requests.exceptions.ReadTimeout` when removing container
2 parents f6edc01 + d36a9e5 commit bad113b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readthedocs/doc_builder/environments.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from docker.errors import APIError as DockerAPIError
1717
from docker.errors import DockerException
1818
from docker.errors import NotFound as DockerNotFoundError
19-
from requests.exceptions import ConnectionError
19+
from requests.exceptions import ConnectionError, ReadTimeout
2020
from requests_toolbelt.multipart.encoder import MultipartEncoder
2121
from slumber.exceptions import HttpClientError
2222

@@ -906,7 +906,7 @@ def __exit__(self, exc_type, exc_value, tb):
906906
)
907907
# Catch direct failures from Docker API or with an HTTP request.
908908
# These errors should not surface to the user.
909-
except (DockerAPIError, ConnectionError):
909+
except (DockerAPIError, ConnectionError, ReadTimeout):
910910
log.exception(
911911
LOG_TEMPLATE,
912912
{

0 commit comments

Comments
 (0)