MCPcopy Index your code
hub / github.com/docker/docker-py / frames_iter

Function frames_iter

docker/utils/socket.py:92–103  ·  view source on GitHub ↗

Return a generator of frames read from socket. A frame is a tuple where the first item is the stream number and the second item is a chunk of data. If the tty setting is enabled, the streams are multiplexed into the stdout stream.

(socket, tty)

Source from the content-addressed store, hash-verified

90
91
92def frames_iter(socket, tty):
93 """
94 Return a generator of frames read from socket. A frame is a tuple where
95 the first item is the stream number and the second item is a chunk of data.
96
97 If the tty setting is enabled, the streams are multiplexed into the stdout
98 stream.
99 """
100 if tty:
101 return ((STDOUT, frame) for frame in frames_iter_tty(socket))
102 else:
103 return frames_iter_no_tty(socket)
104
105
106def frames_iter_no_tty(socket):

Callers 1

_read_from_socketMethod · 0.85

Calls 2

frames_iter_ttyFunction · 0.85
frames_iter_no_ttyFunction · 0.85

Tested by

no test coverage detected