mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Fix for #779167: use InternetConfig proxy settings on MacOSX (in addition
to unix-style).
This commit is contained in:
parent
b36687a483
commit
11d9b06283
1 changed files with 5 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue