Skip to content
Myr

Update verify check and doc-string

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

  • other:+5 added−7 removed

1 file+5 added−7 removed

modified:requests/sessions.py+5 added-7 removed
591 unmodified lines
592593 return r594595 def merge_environment_settings(self, url, proxies, stream, verify, cert):596 """Checks the environment and merges it with some settings."""596 """Check the environment and merge it with some settings."""597 # Gather clues from the surrounding environment.598 if self.trust_env:599 # Set environment's proxies.600 env_proxies = get_environ_proxies(url) or {}601 for (k, v) in env_proxies.items():602 proxies.setdefault(k, v)603604 # Look for configuration.604 # Look for requests environment configuration and be compatible605 # with cURL.606 if verify is True or verify is None:606 verify = os.environ.get('REQUESTS_CA_BUNDLE')607 verify = (os.environ.get('REQUESTS_CA_BUNDLE') or608 os.environ.get('CURL_CA_BUNDLE'))609608 # Curl compatibility.609 if verify is True or verify is None:610 verify = os.environ.get('CURL_CA_BUNDLE')611610 # Merge all the kwargs.611 proxies = merge_setting(proxies, self.proxies)612 stream = merge_setting(stream, self.stream)613 verify = merge_setting(verify, self.verify)
43 unmodified lines