Skip to content
Myr

Avoid having to fix tests

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

authored by Ian Cordasco · committed by Ian Cordasco · parent 27eb54a · Browse files · 1 file+3 added−2 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+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:requests/exceptions.py+3 added-2 removed
16 unmodified lines
17 def __init__(self, *args, **kwargs):18 """19 Initialize RequestException with `request` and `response` objects.20 """21 self.response = kwargs.pop('response', None)21 response = kwargs.pop('response', None)22 self.response = response23 self.request = kwargs.pop('request', None)23 if self.response and not self.request:24 if response and not self.request and hasattr(response, 'request'):25 self.request = self.response.request26 super(RequestException, self).__init__(*args, **kwargs)2728
46 unmodified lines