From 26da72eb4b37c70e4306524dd843ef21f692e455 Mon Sep 17 00:00:00 2001 From: Max Hilbrunner Date: Mon, 24 Jan 2022 10:30:07 +0100 Subject: [PATCH] Fix make_rst.py on Windows --- 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 9e18866ca3c..68f3b66f437 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -438,7 +438,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":