Skip to content
Myr

catch TooManyRedirects in safe_mode

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

authored by miguel · committed by Shivaram Lingamneni · parent 7c5151e · Browse files · 1 file+9 added−1 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+9 added−1 removed

  • other:+9 added−1 removed

1 file+9 added−1 removed

modified:requests/models.py+9 added-1 removed
629 unmodified lines
630 r.error = e631 else:632 raise633634 # build_response can throw TooManyRedirects635 try:634 self._build_response(r)636 self._build_response(r)637 except RequestException as e:638 if self.config.get('safe_mode', False):639 # In safe mode, catch the exception640 self.response.error = e641 else:642 raise643644 # Response manipulation hook.645 self.response = dispatch_hook('response', self.hooks, self.response)646
216 unmodified lines