]> granicus.if.org Git - python/commitdiff
Bug #1378455: a problem of urllib using open_local_file
authorGeorg Brandl <georg@python.org>
Thu, 15 Dec 2005 21:59:00 +0000 (21:59 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 15 Dec 2005 21:59:00 +0000 (21:59 +0000)
Lib/nturl2path.py

index 4fb21487ffe41ef776e11273dbc4897d43dbb39c..2ced9a91c5dd0e26e3e66688a280f645ca9597b8 100644 (file)
@@ -10,6 +10,8 @@ def url2pathname(url):
             C:\foo\bar\spam.foo
     """
     import string, urllib
+    # Windows itself uses ":" even in URLs.
+    url = url.replace(':', '|')
     if not '|' in url:
         # No drive specifier, just convert slashes
         if url[:4] == '////':