summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-04-26 23:11:46 (GMT)
committerGuido van Rossum <guido@python.org>1999-04-26 23:11:46 (GMT)
commit0ec1493d0b0bdbef561c819c560a6703256c88a1 (patch)
treea7ac77183811504a7ce5d02639c2434c5890792d /Tools
parent26c2cb4bd1be9163962d9fee5dc893da6fcfe440 (diff)
downloadcpython-0ec1493d0b0bdbef561c819c560a6703256c88a1.zip
cpython-0ec1493d0b0bdbef561c819c560a6703256c88a1.tar.gz
cpython-0ec1493d0b0bdbef561c819c560a6703256c88a1.tar.bz2
Some changes (maybe not enough?) to make it work on Windows with local
file URLs.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/webchecker/webchecker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/webchecker/webchecker.py b/Tools/webchecker/webchecker.py
index 93078bb..3529338 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):