mercurial/windows.py
changeset 30612 d623cc6b3742
parent 30474 b02e210a6817
child 30615 bb77654dc7ae
--- a/mercurial/windows.py	Sat Dec 17 19:36:40 2016 +0530
+++ b/mercurial/windows.py	Sat Dec 17 19:47:17 2016 +0530
@@ -18,6 +18,7 @@
 from . import (
     encoding,
     osutil,
+    pycompat,
     win32,
 )
 
@@ -303,7 +304,7 @@
     An extension from PATHEXT is found and added if not present.
     If command isn't found None is returned.'''
     pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD')
-    pathexts = [ext for ext in pathext.lower().split(os.pathsep)]
+    pathexts = [ext for ext in pathext.lower().split(pycompat.ospathsep)]
     if os.path.splitext(command)[1].lower() in pathexts:
         pathexts = ['']
 
@@ -318,7 +319,7 @@
     if os.sep in command:
         return findexisting(command)
 
-    for path in os.environ.get('PATH', '').split(os.pathsep):
+    for path in os.environ.get('PATH', '').split(pycompat.ospathsep):
         executable = findexisting(os.path.join(path, command))
         if executable is not None:
             return executable