]> granicus.if.org Git - python/commitdiff
Fix for #779167: use InternetConfig proxy settings on MacOSX (in addition
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 16 Jul 2004 11:45:00 +0000 (11:45 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 16 Jul 2004 11:45:00 +0000 (11:45 +0000)
to unix-style).

Lib/urllib.py

index 823429690823ee7104d11325fe4aa2498ecef86d..f472d42b7a12a5c82cf3d570f2dc6d9db047bd34 100644 (file)
@@ -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.