Skip to content
Myr

Explicitly check for None

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 c2fab5b · Browse files · 1 file+2 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+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:requests/exceptions.py+2 added-1 removed
19 unmodified lines
20 """21 response = kwargs.pop('response', None)22 self.response = response23 self.request = kwargs.pop('request', None)24 if response and not self.request and hasattr(response, 'request'):24 if (response is not None and not self.request and25 hasattr(response, 'request')):26 self.request = self.response.request27 super(RequestException, self).__init__(*args, **kwargs)2829
46 unmodified lines