summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-25 07:45:51 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-25 07:45:51 (GMT)
commit38feaf0fef244879411f094a7e68f542a6771dea (patch)
tree632d870bad650ece1724111091a2b307759ea997 /Lib/urllib.py
parent2cb57a40b28f4680a1433d4640d99f4b2efe7165 (diff)
downloadcpython-38feaf0fef244879411f094a7e68f542a6771dea.zip
cpython-38feaf0fef244879411f094a7e68f542a6771dea.tar.gz
cpython-38feaf0fef244879411f094a7e68f542a6771dea.tar.bz2
#2879: rename _winreg to winreg.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 5cdfb46..a5171ef 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -1489,19 +1489,19 @@ elif os.name == 'nt':
"""
proxies = {}
try:
- import _winreg
+ import winreg
except ImportError:
# Std module, so should be around - but you never know!
return proxies
try:
- internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER,
+ internetSettings = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
r'Software\Microsoft\Windows\CurrentVersion\Internet Settings')
- proxyEnable = _winreg.QueryValueEx(internetSettings,
- 'ProxyEnable')[0]
+ proxyEnable = winreg.QueryValueEx(internetSettings,
+ 'ProxyEnable')[0]
if proxyEnable:
# Returned as Unicode but problems if not converted to ASCII
- proxyServer = str(_winreg.QueryValueEx(internetSettings,
- 'ProxyServer')[0])
+ proxyServer = str(winreg.QueryValueEx(internetSettings,
+ 'ProxyServer')[0])
if '=' in proxyServer:
# Per-protocol settings
for p in proxyServer.split(';'):
@@ -1537,18 +1537,18 @@ elif os.name == 'nt':
def proxy_bypass_registry(host):
try:
- import _winreg
+ import winreg
import re
except ImportError:
# Std modules, so should be around - but you never know!
return 0
try:
- internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER,
+ internetSettings = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
r'Software\Microsoft\Windows\CurrentVersion\Internet Settings')
- proxyEnable = _winreg.QueryValueEx(internetSettings,
- 'ProxyEnable')[0]
- proxyOverride = str(_winreg.QueryValueEx(internetSettings,
- 'ProxyOverride')[0])
+ proxyEnable = winreg.QueryValueEx(internetSettings,
+ 'ProxyEnable')[0]
+ proxyOverride = str(winreg.QueryValueEx(internetSettings,
+ 'ProxyOverride')[0])
# ^^^^ Returned as Unicode but problems if not converted to ASCII
except WindowsError:
return 0