summaryrefslogtreecommitdiff
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2021-01-25 15:50:14 +0100
committerGitHub <noreply@github.com>2021-01-25 15:50:14 +0100
commiteb9983c59b0683270328b5c40a115bb028209511 (patch)
tree8253099acd4ac245180735d7481e5f56fd1e2d51 /Lib/pydoc.py
parent5c1f15b4b1024cbf0acc85832f0c623d1a4605fd (diff)
downloadcpython-git-eb9983c59b0683270328b5c40a115bb028209511.tar.gz
bpo-42869: Avoid an HTTP redirection. (GH-24174)
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 628f9fc7d1..282a917998 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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: