mirror of https://github.com/docker/docker-py.git
Fix ImageNotFound detection
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
e87ed38f69
commit
93877241f9
4
Makefile
4
Makefile
|
|
@ -44,7 +44,7 @@ integration-test-py3: build-py3
|
|||
.PHONY: integration-dind
|
||||
integration-dind: build build-py3
|
||||
docker rm -vf dpy-dind || :
|
||||
docker run -d --name dpy-dind --privileged dockerswarm/dind:1.13.0-rc3 docker daemon\
|
||||
docker run -d --name dpy-dind --privileged dockerswarm/dind:1.13.0 docker daemon\
|
||||
-H tcp://0.0.0.0:2375
|
||||
docker run --rm --env="DOCKER_HOST=tcp://docker:2375" --link=dpy-dind:docker docker-sdk-python\
|
||||
py.test tests/integration
|
||||
|
|
@ -57,7 +57,7 @@ integration-dind-ssl: build-dind-certs build build-py3
|
|||
docker run -d --name dpy-dind-certs dpy-dind-certs
|
||||
docker run -d --env="DOCKER_HOST=tcp://localhost:2375" --env="DOCKER_TLS_VERIFY=1"\
|
||||
--env="DOCKER_CERT_PATH=/certs" --volumes-from dpy-dind-certs --name dpy-dind-ssl\
|
||||
-v /tmp --privileged dockerswarm/dind:1.13.0-rc3 docker daemon --tlsverify\
|
||||
-v /tmp --privileged dockerswarm/dind:1.13.0 docker daemon --tlsverify\
|
||||
--tlscacert=/certs/ca.pem --tlscert=/certs/server-cert.pem\
|
||||
--tlskey=/certs/server-key.pem -H tcp://0.0.0.0:2375
|
||||
docker run --rm --volumes-from dpy-dind-ssl --env="DOCKER_HOST=tcp://docker:2375"\
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ def create_api_error_from_http_exception(e):
|
|||
cls = APIError
|
||||
if response.status_code == 404:
|
||||
if explanation and ('No such image' in str(explanation) or
|
||||
'not found: does not exist or no read access'
|
||||
'not found: does not exist or no pull access'
|
||||
in str(explanation)):
|
||||
cls = ImageNotFound
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue