Skip to content

Commit fe6c9a6

Browse files
committed
Style fixes. Copied docs to APIClient as well
Signed-off-by: Joffrey F <[email protected]>
1 parent 3470968 commit fe6c9a6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docker/api/exec_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,13 @@ def exec_start(self, exec_id, detach=False, tty=False, stream=False,
122122
Default: False
123123
tty (bool): Allocate a pseudo-TTY. Default: False
124124
stream (bool): Stream response data. Default: False
125+
socket (bool): Return the connection socket to allow custom
126+
read/write operations.
125127
126128
Returns:
127129
(generator or str): If ``stream=True``, a generator yielding
128-
response chunks. A string containing response data otherwise.
130+
response chunks. If ``socket=True``, a socket object for the
131+
connection. A string containing response data otherwise.
129132
130133
Raises:
131134
:py:class:`docker.errors.APIError`

docker/models/containers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,16 @@ def exec_run(self, cmd, stdout=True, stderr=True, stdin=False, tty=False,
142142
detach (bool): If true, detach from the exec command.
143143
Default: False
144144
stream (bool): Stream response data. Default: False
145-
socket (bool): Whether to return a socket object or not. Default: False
145+
socket (bool): Return the connection socket to allow custom
146+
read/write operations. Default: False
146147
environment (dict or list): A dictionary or a list of strings in
147148
the following format ``["PASSWORD=xxx"]`` or
148149
``{"PASSWORD": "xxx"}``.
149150
150151
Returns:
151-
(generator or str):
152+
(generator or str):
152153
If ``stream=True``, a generator yielding response chunks.
153-
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).
154+
If ``socket=True``, a socket object for the connection.
154155
A string containing response data otherwise.
155156
Raises:
156157
:py:class:`docker.errors.APIError`

0 commit comments

Comments
 (0)