瀏覽代碼

[3.x] Fix make_rst.py on Windows

(cherry picked from commit 54de06389072c37c3cc3d8340e837b21befc14e6)
Max Hilbrunner 3 年之前
父節點
當前提交
f00260f1b7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      doc/tools/make_rst.py

+ 1 - 1
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":