MCPcopy Index your code
hub / github.com/aws/aws-cli / _verify_content_length

Method _verify_content_length

awscli/botocore/response.py:136–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

134 yield current_chunk
135
136 def _verify_content_length(self):
137 # See: https://github.com/kennethreitz/requests/issues/1855
138 # Basically, our http library doesn't do this for us, so we have
139 # to do this ourself.
140 if self._content_length is not None and self._amount_read != int(
141 self._content_length
142 ):
143 raise IncompleteReadError(
144 actual_bytes=self._amount_read,
145 expected_bytes=int(self._content_length),
146 )
147
148 def close(self):
149 """Close the underlying http response stream."""

Callers 1

readMethod · 0.95

Calls 1

IncompleteReadErrorClass · 0.90

Tested by

no test coverage detected