MCPcopy
hub / github.com/docker/docker-py / _stream_raw_result

Method _stream_raw_result

docker/api/client.py:413–422  ·  view source on GitHub ↗

Stream result for TTY-enabled container and raw binary data

(self, response, chunk_size=1, decode=True)

Source from the content-addressed store, hash-verified

411 yield data
412
413 def _stream_raw_result(self, response, chunk_size=1, decode=True):
414 ''' Stream result for TTY-enabled container and raw binary data'''
415 self._raise_for_status(response)
416
417 # Disable timeout on the underlying socket to prevent
418 # Read timed out(s) for long running processes
419 socket = self._get_raw_response_socket(response)
420 self._disable_socket_timeout(socket)
421
422 yield from response.iter_content(chunk_size, decode)
423
424 def _read_from_socket(self, response, stream, tty=True, demux=False):
425 """Consume all data from the socket, close the response and return the

Callers 4

_get_result_ttyMethod · 0.95
get_imageMethod · 0.80
exportMethod · 0.80
get_archiveMethod · 0.80

Calls 3

_raise_for_statusMethod · 0.95

Tested by

no test coverage detected