Explicitly check if response is None.
In versions of requests < 3.0, the __bool__/__nonzero__ method on RawResponse is
overloaded to return False if the status code is 4xx or 5xx.
Closes
@@ -282,7 +282,7 @@ class RawResponse(Response):
self._error = None
self._reason = None
self.connection = connection
- if response:
+ if response is not None:
self.headers = lowercase_keys(dict(response.headers))
self.error = response.reason
self.status = response.status_code
