mirror of https://github.com/python/cpython
bpo-42869: Avoid an HTTP redirection. (GH-24174)
This commit is contained in:
parent
5c1f15b4b1
commit
eb9983c59b
|
@ -504,7 +504,7 @@ class Doc:
|
|||
not file.startswith(os.path.join(basedir, 'site-packages')))) and
|
||||
object.__name__ not in ('xml.etree', 'test.pydoc_mod')):
|
||||
if docloc.startswith(("http://", "https://")):
|
||||
docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__.lower())
|
||||
docloc = "{}/{}.html".format(docloc.rstrip("/"), object.__name__.lower())
|
||||
else:
|
||||
docloc = os.path.join(docloc, object.__name__.lower() + ".html")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue