Update how we check verify when inspecting env variables
authorIan Cordasco <ian.cordasco@rackspace.com>
Wed, 2 Jul 2014 15:26:15 +0000 (10:26 -0500)
committerIan Cordasco <ian.cordasco@rackspace.com>
Wed, 2 Jul 2014 15:26:15 +0000 (10:26 -0500)
requests/sessions.py

index a263138aadc67d29a86e50e7ec5655ff74795b62..96fff63736b8f01d7e6378500617e0fb61f56a27 100644 (file)
@@ -436,11 +436,11 @@ class Session(SessionRedirectMixin):
                 proxies.setdefault(k, v)
 
             # Look for configuration.
-            if not verify and verify is not False:
+            if verify is True or (verify is None and verify is not False):
                 verify = os.environ.get('REQUESTS_CA_BUNDLE')
 
             # Curl compatibility.
-            if not verify and verify is not False:
+            if verify is True or (verify is None and verify is not False):
                 verify = os.environ.get('CURL_CA_BUNDLE')
 
         # Merge all the kwargs.