summaryrefslogtreecommitdiff
path: root/docker/errors.py
diff options
context:
space:
mode:
authorLars Kellogg-Stedman <lars@redhat.com>2015-07-16 15:10:07 -0400
committerLars Kellogg-Stedman <lars@redhat.com>2015-07-17 08:31:54 -0400
commit2e546f7e26fec006dd18119d4857580ec9ccd540 (patch)
tree7fc92cce86583dd16827eb0019d6ff56be53c2fd /docker/errors.py
parent946eb964adceef7f531ca4f30c4bfe973566811a (diff)
downloaddocker-py-2e546f7e26fec006dd18119d4857580ec9ccd540.tar.gz
return NotFound on 404 errors
This changes raises docker.errors.NotFound on 404 errors. This gives client code the ability to differentiate between "an image does not exist" and "you are using the api incorrectly". This inherits from docker.errors.APIError so it will not affect any existing code.
Diffstat (limited to 'docker/errors.py')
-rw-r--r--docker/errors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/errors.py b/docker/errors.py
index d15e332..066406a 100644
--- a/docker/errors.py
+++ b/docker/errors.py
@@ -53,6 +53,10 @@ class DockerException(Exception):
pass
+class NotFound(APIError):
+ pass
+
+
class InvalidVersion(DockerException):
pass