diff options
author | Guido van Rossum <guido@python.org> | 1999-04-26 23:11:46 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-04-26 23:11:46 +0000 |
commit | 0ec1493d0b0bdbef561c819c560a6703256c88a1 (patch) | |
tree | a7ac77183811504a7ce5d02639c2434c5890792d /Tools/webchecker | |
parent | 26c2cb4bd1be9163962d9fee5dc893da6fcfe440 (diff) | |
download | cpython-git-0ec1493d0b0bdbef561c819c560a6703256c88a1.tar.gz |
Some changes (maybe not enough?) to make it work on Windows with local
file URLs.
Diffstat (limited to 'Tools/webchecker')
-rwxr-xr-x | Tools/webchecker/webchecker.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/webchecker/webchecker.py b/Tools/webchecker/webchecker.py index 93078bb94b..352933854d 100755 --- a/Tools/webchecker/webchecker.py +++ b/Tools/webchecker/webchecker.py @@ -606,9 +606,9 @@ class MyURLopener(urllib.FancyURLopener): def open_file(self, url): path = urllib.url2pathname(urllib.unquote(url)) - if path[-1] != os.sep: - url = url + '/' if os.path.isdir(path): + if path[-1] != os.sep: + url = url + '/' indexpath = os.path.join(path, "index.html") if os.path.exists(indexpath): return self.open_file(url + "index.html") @@ -625,7 +625,7 @@ class MyURLopener(urllib.FancyURLopener): s.write('<A HREF="%s">%s</A>\n' % (q, q)) s.seek(0) return s - return urllib.FancyURLopener.open_file(self, path) + return urllib.FancyURLopener.open_file(self, url) class MyHTMLParser(sgmllib.SGMLParser): |