From f00260f1b7754c3003b624c842bb7dc83d895132 Mon Sep 17 00:00:00 2001 From: Max Hilbrunner Date: Mon, 24 Jan 2022 10:28:22 +0100 Subject: [PATCH] [3.x] Fix make_rst.py on Windows (cherry picked from commit 54de06389072c37c3cc3d8340e837b21befc14e6) --- doc/tools/make_rst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 746bfd199d4..6d08efb1f4d 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -321,7 +321,7 @@ def main(): # type: () -> None for path in args.path: # Cut off trailing slashes so os.path.basename doesn't choke. - if path.endswith(os.sep): + if path.endswith("/") or path.endswith("\\"): path = path[:-1] if os.path.basename(path) == "modules":