##// END OF EJS Templates
py3: replace os.pathsep with pycompat.ospathsep...
Pulkit Goyal -
r30612:d623cc6b default
parent child Browse files
Show More
@@ -23,6 +23,7 import unicodedata
23 23 from .i18n import _
24 24 from . import (
25 25 encoding,
26 pycompat,
26 27 )
27 28
28 29 posixfile = open
@@ -461,7 +462,7 def findexe(command):
461 462 if sys.platform == 'plan9':
462 463 return findexisting(os.path.join('/bin', command))
463 464
464 for path in os.environ.get('PATH', '').split(os.pathsep):
465 for path in os.environ.get('PATH', '').split(pycompat.ospathsep):
465 466 executable = findexisting(os.path.join(path, command))
466 467 if executable is not None:
467 468 return executable
@@ -4,6 +4,7 import os
4 4
5 5 from . import (
6 6 osutil,
7 pycompat,
7 8 util,
8 9 win32,
9 10 )
@@ -33,7 +34,7 def systemrcpath():
33 34 if not isinstance(value, str) or not value:
34 35 return rcpath
35 36 value = util.localpath(value)
36 for p in value.split(os.pathsep):
37 for p in value.split(pycompat.ospathsep):
37 38 if p.lower().endswith('mercurial.ini'):
38 39 rcpath.append(p)
39 40 elif os.path.isdir(p):
@@ -18,6 +18,7 from .i18n import _
18 18 from . import (
19 19 encoding,
20 20 osutil,
21 pycompat,
21 22 win32,
22 23 )
23 24
@@ -303,7 +304,7 def findexe(command):
303 304 An extension from PATHEXT is found and added if not present.
304 305 If command isn't found None is returned.'''
305 306 pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD')
306 pathexts = [ext for ext in pathext.lower().split(os.pathsep)]
307 pathexts = [ext for ext in pathext.lower().split(pycompat.ospathsep)]
307 308 if os.path.splitext(command)[1].lower() in pathexts:
308 309 pathexts = ['']
309 310
@@ -318,7 +319,7 def findexe(command):
318 319 if os.sep in command:
319 320 return findexisting(command)
320 321
321 for path in os.environ.get('PATH', '').split(os.pathsep):
322 for path in os.environ.get('PATH', '').split(pycompat.ospathsep):
322 323 executable = findexisting(os.path.join(path, command))
323 324 if executable is not None:
324 325 return executable
General Comments 0
You need to be logged in to leave comments. Login now