pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/0ec1493d0b0bdbef561c819c560a6703256c88a1

"stylesheet" href="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> Some changes (maybe not enough?) to make it work on Windows with local · python/cpython@0ec1493 · GitHub
Skip to content

Commit 0ec1493

Browse files
committed
Some changes (maybe not enough?) to make it work on Windows with local
file URLs.
1 parent 26c2cb4 commit 0ec1493

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Tools/webchecker/webchecker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,9 @@ def http_error_401(self, url, fp, errcode, errmsg, headers):
606606

607607
def open_file(self, url):
608608
path = urllib.url2pathname(urllib.unquote(url))
609-
if path[-1] != os.sep:
610-
url = url + '/'
611609
if os.path.isdir(path):
610+
if path[-1] != os.sep:
611+
url = url + '/'
612612
indexpath = os.path.join(path, "index.html")
613613
if os.path.exists(indexpath):
614614
return self.open_file(url + "index.html")
@@ -625,7 +625,7 @@ def open_file(self, url):
625625
s.write('<A HREF="%s">%s</A>\n' % (q, q))
626626
s.seek(0)
627627
return s
628-
return urllib.FancyURLopener.open_file(self, path)
628+
return urllib.FancyURLopener.open_file(self, url)
629629

630630

631631
class MyHTMLParser(sgmllib.SGMLParser):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy