]> granicus.if.org Git - python/commitdiff
Interpret three slashes in file: URL as local file (for Netscape on
authorGuido van Rossum <guido@python.org>
Wed, 20 Aug 1997 23:34:01 +0000 (23:34 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 20 Aug 1997 23:34:01 +0000 (23:34 +0000)
Windows/Mac).

Lib/urllib.py

index d9040cc99e82908a66831074724648d9853f00e0..337015fed00d5095a6d52fae75539b366857aa00 100644 (file)
@@ -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):