Explorar o código

[3.x] Fix make_rst.py on Windows

(cherry picked from commit 54de06389072c37c3cc3d8340e837b21befc14e6)
Max Hilbrunner %!s(int64=3) %!d(string=hai) anos
pai
achega
f00260f1b7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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":