8000 bpo-42869: Avoid an HTTP redirection. (GH-24174) · python/cpython@eb9983c · GitHub
[go: up one dir, main page]

Skip to content

Commit eb9983c

Browse files
authored
bpo-42869: Avoid an HTTP redirection. (GH-24174)
1 parent 5c1f15b commit eb9983c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/pydoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')):
504504
not file.startswith(os.path.join(basedir, 'site-packages')))) and
505505
object.__name__ not in ('xml.etree', 'test.pydoc_mod')):
506506
if docloc.startswith(("http://", "https://")):
507-
docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__.lower())
507+
docloc = "{}/{}.html".format(docloc.rstrip("/"), object.__name__.lower())
508508
else:
509509
docloc = os.path.join(docloc, object.__name__.lower() + ".html")
510510
else:

0 commit comments

Comments
 (0)
0