summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2017-11-06 17:04:27 -0800
committerJoffrey F <f.joffrey@gmail.com>2017-11-06 17:10:42 -0800
commitf238fe5554cca48bb9bb366a07bd219c090e445b (patch)
tree10c28f141a2ca0883f3b5793dad7bd477d3bf5bd
parent05f40f038172af00fd8e5a0a4b284daf55358dae (diff)
downloaddocker-py-f238fe5554cca48bb9bb366a07bd219c090e445b.tar.gz
Style fixes. Copied docs to APIClient as well
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r--docker/api/exec_api.py5
-rw-r--r--docker/models/containers.py7
2 files changed, 8 insertions, 4 deletions
diff --git a/docker/api/exec_api.py b/docker/api/exec_api.py
index 6f42524..cff5cfa 100644
--- a/docker/api/exec_api.py
+++ b/docker/api/exec_api.py
@@ -122,10 +122,13 @@ class ExecApiMixin(object):
Default: False
tty (bool): Allocate a pseudo-TTY. Default: False
stream (bool): Stream response data. Default: False
+ socket (bool): Return the connection socket to allow custom
+ read/write operations.
Returns:
(generator or str): If ``stream=True``, a generator yielding
- response chunks. A string containing response data otherwise.
+ response chunks. If ``socket=True``, a socket object for the
+ connection. A string containing response data otherwise.
Raises:
:py:class:`docker.errors.APIError`
diff --git a/docker/models/containers.py b/docker/models/containers.py
index 689d8dd..97a08b9 100644
--- a/docker/models/containers.py
+++ b/docker/models/containers.py
@@ -142,15 +142,16 @@ class Container(Model):
detach (bool): If true, detach from the exec command.
Default: False
stream (bool): Stream response data. Default: False
- socket (bool): Whether to return a socket object or not. Default: False
+ socket (bool): Return the connection socket to allow custom
+ read/write operations. Default: False
environment (dict or list): A dictionary or a list of strings in
the following format ``["PASSWORD=xxx"]`` or
``{"PASSWORD": "xxx"}``.
Returns:
- (generator or str):
+ (generator or str):
If ``stream=True``, a generator yielding response chunks.
- If ``socket=True``, a socket object of the connection (an SSL wrapped socket for TLS-based docker, on which one must call ``sendall`` and ``recv`` -- and **not** os.read / os.write).
+ If ``socket=True``, a socket object for the connection.
A string containing response data otherwise.
Raises:
:py:class:`docker.errors.APIError`