diff mercurial/scmwindows.py @ 30617:d623cc6b3742

py3: replace os.pathsep with pycompat.ospathsep os.pathsep returns unicode on Python 3. We already have pycompat.ospathsep which return bytes on Python 3. This patch replaces all the occurrences of os.pathsep in the codebase (excluding tests) to pycompat.ospathsep.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 17 Dec 2016 19:47:17 +0530
parents 365812902904
children 344e68882cd3
line wrap: on
line diff
--- a/mercurial/scmwindows.py	Sat Dec 17 19:36:40 2016 +0530
+++ b/mercurial/scmwindows.py	Sat Dec 17 19:47:17 2016 +0530
@@ -4,6 +4,7 @@
 
 from . import (
     osutil,
+    pycompat,
     util,
     win32,
 )
@@ -33,7 +34,7 @@
     if not isinstance(value, str) or not value:
         return rcpath
     value = util.localpath(value)
-    for p in value.split(os.pathsep):
+    for p in value.split(pycompat.ospathsep):
         if p.lower().endswith('mercurial.ini'):
             rcpath.append(p)
         elif os.path.isdir(p):