summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-07-16 11:45:00 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2004-07-16 11:45:00 (GMT)
commit11d9b0628396749eaf9bc7f8a0e37f0cd46d75bf (patch)
tree77c42662be960ffba2844503b9991a4bdb41080a /Lib/urllib.py
parentb36687a4833ac3a49cea0342ec3b197ea583b835 (diff)
downloadcpython-11d9b0628396749eaf9bc7f8a0e37f0cd46d75bf.zip
cpython-11d9b0628396749eaf9bc7f8a0e37f0cd46d75bf.tar.gz
cpython-11d9b0628396749eaf9bc7f8a0e37f0cd46d75bf.tar.bz2
Fix for #779167: use InternetConfig proxy settings on MacOSX (in addition
to unix-style).
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 8234296..f472d42 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.