Skip to content
Myr

utils: winreg module may not exist like on windows universal platform.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Anton Fedchin · committed by Anton Fedchin · parent d1fb1a2 · Browse files · 1 file+8 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−4 removed

  • other:+8 added−4 removed

1 file+8 added−4 removed

modified:requests/utils.py+8 added-4 removed
43 unmodified lines
44if sys.platform == 'win32':45 # provide a proxy_bypass version on Windows without DNS lookups4647 def proxy_bypass_registry(host):48 if is_py3:49 import winreg50 else:51 import _winreg as winreg48 try:49 if is_py3:50 import winreg51 else:52 import _winreg as winreg53 except ImportError:54 return False5556 try:57 internetSettings = winreg.OpenKey(winreg.HKEY_CURRENT_USER,58 r'Software\Microsoft\Windows\CurrentVersion\Internet Settings')59 # ProxyEnable could be REG_SZ or REG_DWORD, normalizing it60 proxyEnable = int(winreg.QueryValueEx(internetSettings,
888 unmodified lines