Return True, if host should be bypassed. Checks proxy settings gathered from the environment, if specified, or from the MacOSX framework SystemConfiguration.
(host)
| 2049 | |
| 2050 | |
| 2051 | def proxy_bypass(host): |
| 2052 | """Return True, if host should be bypassed. |
| 2053 | |
| 2054 | Checks proxy settings gathered from the environment, if specified, |
| 2055 | or from the MacOSX framework SystemConfiguration. |
| 2056 | |
| 2057 | """ |
| 2058 | proxies = getproxies_environment() |
| 2059 | if proxies: |
| 2060 | return proxy_bypass_environment(host, proxies) |
| 2061 | else: |
| 2062 | return proxy_bypass_macosx_sysconf(host) |
| 2063 | |
| 2064 | def getproxies(): |
| 2065 | return getproxies_environment() or getproxies_macosx_sysconf() |