is should not be used for comparing numbers
authorAlex Gaynor <alex.gaynor@gmail.com>
Mon, 1 Apr 2013 06:20:46 +0000 (23:20 -0700)
committerAlex Gaynor <alex.gaynor@gmail.com>
Mon, 1 Apr 2013 06:20:46 +0000 (23:20 -0700)
requests/models.py

index 6ed2b599467f4f87e8977716ab6659073c2df47a..2850950e861d36994be9571e4076abd2560ad0e3 100644 (file)
@@ -575,7 +575,7 @@ class Response(object):
                     raise RuntimeError(
                         'The content for this response was already consumed')
 
-                if self.status_code is 0:
+                if self.status_code == 0:
                     self._content = None
                 else:
                     self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()