Skip to content

Commit 933ee52

Browse files
committed
Merge branch 'master' of github.com:docker/docker-py
2 parents 90f81ed + 1f5ba4b commit 933ee52

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

docker/clientbase.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ def _raise_for_status(self, response, explanation=None):
9999
try:
100100
response.raise_for_status()
101101
except requests.exceptions.HTTPError as e:
102+
if e.response.status_code == 404:
103+
raise errors.NotFound(e, response, explanation=explanation)
102104
raise errors.APIError(e, response, explanation=explanation)
103105

104106
def _result(self, response, json=False, binary=False):

docker/errors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class DockerException(Exception):
5353
pass
5454

5555

56+
class NotFound(APIError):
57+
pass
58+
59+
5660
class InvalidVersion(DockerException):
5761
pass
5862

docs/api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ Kill a container or send a signal to a container
511511
**Params**:
512512

513513
* container (str): The container to kill
514-
* signal (str or int): The singal to send. Defaults to `SIGKILL`
514+
* signal (str or int): The signal to send. Defaults to `SIGKILL`
515515

516516
## load_image
517517

@@ -726,6 +726,10 @@ Identical to the `docker search` command.
726726
Similar to the `docker start` command, but doesn't support attach options. Use
727727
`.logs()` to recover `stdout`/`stderr`.
728728

729+
**Params**:
730+
731+
* container (str): The container to start
732+
729733
**Deprecation warning:** For API version > 1.15, it is highly recommended to
730734
provide host config options in the
731735
[`host_config` parameter of `create_container`](#create_container)
@@ -748,7 +752,7 @@ This will stream statistics for a specific container.
748752

749753
**Params**:
750754

751-
* container (str): The container to start
755+
* container (str): The container to stream statistics for
752756
* decode (bool): If set to true, stream will be decoded into dicts on the
753757
fly. False by default.
754758

0 commit comments

Comments
 (0)