diff options
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index a484736..c3da7bf 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -326,12 +326,12 @@ class URLopener: host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'rb'), - headers, 'file:'+pathname2url(file)) + headers, 'file:'+file) host, port = splitport(host) if not port \ and socket.gethostbyname(host) in (localhost(), thishost()): return addinfourl(open(url2pathname(file), 'rb'), - headers, 'file:'+pathname2url(file)) + headers, 'file:'+file) raise IOError, ('local file error', 'not on local host') # Use FTP protocol |