Skip to content
Myr

Remove error swallowing exception catching of AttributeError

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Frankie Robertson · committed by Frankie Robertson · parent 022e23c · Browse files · 1 file+6 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−10 removed

  • other:+6 added−10 removed

1 file+6 added−10 removed

modified:requests/models.py+6 added-10 removed
745 unmodified lines
746 """Content of the response, in bytes."""747748 if self._content is False:749 # Read the contents.750 try:751 if self._content_consumed:752 raise RuntimeError(753 'The content for this response was already consumed')750 if self._content_consumed:751 raise RuntimeError(752 'The content for this response was already consumed')753755 if self.status_code == 0:756 self._content = None757 else:758 self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()759760 except AttributeError:754 if self.status_code == 0:755 self._content = None756 else:757 self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()758759 self._content_consumed = True760 # don't need to release the connection; that's been handled by urllib3761 # since we exhausted the data.
120 unmodified lines