From: Jack Jansen Date: Fri, 16 Jul 2004 11:45:00 +0000 (+0000) Subject: Fix for #779167: use InternetConfig proxy settings on MacOSX (in addition X-Git-Tag: v2.4a2~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11d9b0628396749eaf9bc7f8a0e37f0cd46d75bf;p=python Fix for #779167: use InternetConfig proxy settings on MacOSX (in addition to unix-style). --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 8234296908..f472d42b7a 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -1187,8 +1187,8 @@ def getproxies_environment(): proxies[name[:-6]] = value return proxies -if os.name == 'mac': - def getproxies(): +if sys.platform == 'darwin': + def getproxies_internetconfig(): """Return a dictionary of scheme -> proxy server URL mappings. By convention the mac uses Internet Config to store @@ -1221,6 +1221,9 @@ if os.name == 'mac': def proxy_bypass(x): return 0 + def getproxies(): + return getproxies_environment() or getproxies_internetconfig() + elif os.name == 'nt': def getproxies_registry(): """Return a dictionary of scheme -> proxy server URL mappings.