Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3764595

Browse files
committed
Yet another patch by Sjoerd Mullender:
Don't convert URLs to URLs using pathname2url.
1 parent f03fdbc commit 3764595

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/urllib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ def open_local_file(self, url):
326326
host, file = splithost(url)
327327
if not host:
328328
return addinfourl(open(url2pathname(file), 'rb'),
329-
headers, 'file:'+pathname2url(file))
329+
headers, 'file:'+file)
330330
host, port = splitport(host)
331331
if not port \
332332
and socket.gethostbyname(host) in (localhost(), thishost()):
333333
return addinfourl(open(url2pathname(file), 'rb'),
334-
headers, 'file:'+pathname2url(file))
334+
headers, 'file:'+file)
335335
raise IOError, ('local file error', 'not on local host')
336336

337337
# Use FTP protocol

0 commit comments

Comments
 (0)