diff options
author | Martin Monperrus <monperrus@users.noreply.github.com> | 2017-10-02 09:40:21 +0200 |
---|---|---|
committer | Joffrey F <f.joffrey@gmail.com> | 2017-11-06 17:10:42 -0800 |
commit | 05f40f038172af00fd8e5a0a4b284daf55358dae (patch) | |
tree | 542f778633673fee7b257dac3ae93c8fa4f943bd | |
parent | 1a4b1813449a7add39c13cbf00101bbf8443b76f (diff) | |
download | docker-py-05f40f038172af00fd8e5a0a4b284daf55358dae.tar.gz |
explain the socket parameter of exec_run
Signed-off-by: Martin Monperrus <martin.monperrus@gnieh.org>
-rw-r--r-- | docker/models/containers.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docker/models/containers.py b/docker/models/containers.py index ea8c10b..689d8dd 100644 --- a/docker/models/containers.py +++ b/docker/models/containers.py @@ -142,14 +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 environment (dict or list): A dictionary or a list of strings in the following format ``["PASSWORD=xxx"]`` or ``{"PASSWORD": "xxx"}``. Returns: - (generator or str): If ``stream=True``, a generator yielding - response chunks. A string containing response data otherwise. - + (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). + A string containing response data otherwise. Raises: :py:class:`docker.errors.APIError` If the server returns an error. |