Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b36687a commit 11d9b06Copy full SHA for 11d9b06
1 file changed
Lib/urllib.py
@@ -1187,8 +1187,8 @@ def getproxies_environment():
1187
proxies[name[:-6]] = value
1188
return proxies
1189
1190
-if os.name == 'mac':
1191
- def getproxies():
+if sys.platform == 'darwin':
+ def getproxies_internetconfig():
1192
"""Return a dictionary of scheme -> proxy server URL mappings.
1193
1194
By convention the mac uses Internet Config to store
@@ -1221,6 +1221,9 @@ def getproxies():
1221
def proxy_bypass(x):
1222
return 0
1223
1224
+ def getproxies():
1225
+ return getproxies_environment() or getproxies_internetconfig()
1226
+
1227
elif os.name == 'nt':
1228
def getproxies_registry():
1229
0 commit comments