diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-05-04 23:44:49 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-05-04 23:44:49 +0000 |
commit | 828023b6b5d4d84a3fc01e9907142662a33d45a6 (patch) | |
tree | 1f7797a585fb80a1e618fd115d14e827190586fa /Mac/Tools/IDE/PythonIDEMain.py | |
parent | 258dfebfb4286afe176cce1d6f6245d53112fc1a (diff) | |
download | cpython-git-828023b6b5d4d84a3fc01e9907142662a33d45a6.tar.gz |
Repair redirect handling and raise URLError on host-not-found.
The latest changes to the redirect handler couldn't possibly have been
tested, because they did not compute a newurl and failed with a
NameError. The __name__ == "__main__": block has a test for
redirects.
Also, fix SF bug 723831. A urlopen() that failed because the host was
not found raised a socket.gaierror unlike earlier versions of
urllib2. The problem is that httplib actually establishes the
connection at a different point starting with Python 2.2. Move the
try/except to endheaders(), which is where the connection gets
established.
Diffstat (limited to 'Mac/Tools/IDE/PythonIDEMain.py')
0 files changed, 0 insertions, 0 deletions