summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-20 23:34:01 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-20 23:34:01 (GMT)
commitb6784dc53f41def6dcf59585038cd720c2f66969 (patch)
tree1b4502562a4af5f7f157618dc82b688b1e49cc33 /Lib
parent4f46fc6d577ad1756ce8d2485938fd02a45fa709 (diff)
downloadcpython-b6784dc53f41def6dcf59585038cd720c2f66969.zip
cpython-b6784dc53f41def6dcf59585038cd720c2f66969.tar.gz
cpython-b6784dc53f41def6dcf59585038cd720c2f66969.tar.bz2
Interpret three slashes in file: URL as local file (for Netscape on
Windows/Mac).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index d9040cc..337015f 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -281,10 +281,10 @@ class URLopener:
# Use local file or FTP depending on form of URL
def open_file(self, url):
- if url[:2] == '//':
- return self.open_ftp(url)
- else:
- return self.open_local_file(url)
+ if url[:2] == '//' and url[2:3] != '/':
+ return self.open_ftp(url)
+ else:
+ return self.open_local_file(url)
# Use local file
def open_local_file(self, url):