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