urlparse.urljoin is the public API; urllib.basejoin is an undocumented alias

This commit is contained in:
Carl Meyer 2010-05-27 12:52:11 -04:00
parent 1734bf0d6c
commit 01f36c946b
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ class HTMLPage(object):
# Tack index.html onto file:// URLs that point to directories
(scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url)
if scheme == 'file' and os.path.isdir(urllib.url2pathname(path)):
url = urllib.basejoin(url, 'index.html')
url = urlparse.urljoin(url, 'index.html')
resp = urlopen(url)