Changeset 72632 in vbox for trunk/src/VBox/ValidationKit/common
- Timestamp:
- Jun 20, 2018 3:42:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/common/webutils.py
r70660 r72632 43 43 from urllib.parse import urlencode as urllib_urlencode; # pylint: disable=import-error,no-name-in-module 44 44 from urllib.request import urlopen as urllib_urlopen; # pylint: disable=import-error,no-name-in-module 45 import urllib.request; # pylint: disable=import-error,no-name-in-module 45 46 46 47 # Validation Kit imports. … … 147 148 http_proxy, ftp_proxy, no_proxy environment variables. 148 149 149 @todo Fixed build burn here. Please set default value for fNoProxies150 to appropriate one.151 150 """ 152 151 if fnError is None: … … 160 159 try: 161 160 ## @todo We get 404.html content instead of exceptions here, which is confusing and should be addressed. 162 if fNoProxies:161 if not fNoProxies: 163 162 oSrc = urllib_urlopen(sUrlFile); 163 elif sys.version_info[0] < 3: 164 oSrc = urllib_urlopen(sUrlFile, proxies = dict()); 164 165 else: 165 oSrc = urllib_urlopen(sUrlFile, proxies = dict()); 166 oProxyHandler = urllib.request.ProxyHandler(proxies = dict()); # p?ylint: disable=??? 167 oOpener = urllib.request.build_opener(oProxyHandler) # p?ylint: disable=??? 168 oSrc = oOpener.open(sUrlFile); 166 169 oDst = utils.openNoInherit(sDstFile, 'wb'); 167 170 oDst.write(oSrc.read());
Note:
See TracChangeset
for help on using the changeset viewer.