Message93473
In Python 2.6.3 on Mac OS 10.6.1, there is a bug in
lib/python2.6/urllib.py, line 1367. The variable hostIP is used before
it's defined. You can fix it by adding "hostIP = None" at around line
1355. I got the following exception when calling urllib.urlopen using a
proxy:
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 87, in urlopen
return opener.open(url)
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 206, in open
return getattr(self, name)(url)
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 317, in open_http
if proxy_bypass(realhost):
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 1398, in proxy_bypass
return proxy_bypass_macosx_sysconf(host)
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 1367, in proxy_bypass_macosx_sysconf
if hostIP is None:
UnboundLocalError: local variable 'hostIP' referenced before assignment |
|
Date |
User |
Action |
Args |
2009-10-03 03:30:55 | jweber | set | recipients:
+ jweber, ronaldoussoren |
2009-10-03 03:30:55 | jweber | set | messageid: <1254540655.1.0.243210284724.issue7044@psf.upfronthosting.co.za> |
2009-10-03 03:30:53 | jweber | link | issue7044 messages |
2009-10-03 03:30:52 | jweber | create | |
|