Commit a434524b authored by Jack Jansen's avatar Jack Jansen

When testing for localhost/ first map to lower case. Spotted by Skip.

parent ae8981d7
......@@ -404,7 +404,7 @@ class URLopener:
def open_file(self, url):
"""Use local file or FTP depending on form of URL."""
if url[:2] == '//' and url[2:3] != '/' and url[2:12] != 'localhost/':
if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/':
return self.open_ftp(url)
else:
return self.open_local_file(url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment