Skip to content

Commit 07f159d

Browse files
committed
Bug #1378455: a problem of urllib using open_local_file
1 parent 6ee3391 commit 07f159d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/nturl2path.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ def url2pathname(url):
1010
C:\foo\bar\spam.foo
1111
"""
1212
import string, urllib
13+
# Windows itself uses ":" even in URLs.
14+
url = url.replace(':', '|')
1315
if not '|' in url:
1416
# No drive specifier, just convert slashes
1517
if url[:4] == '////':

0 commit comments

Comments
 (0)