mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Interpret three slashes in file: URL as local file (for Netscape on
Windows/Mac).
This commit is contained in:
parent
4f46fc6d57
commit
b6784dc53f
1 changed files with 4 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue