diff mercurial/pure/osutil.py @ 30304:ba2c04059317

py3: use pycompat.ossep at certain places Certain instances of os.sep has been converted to pycompat.ossep where it was sure to use bytes only. There are more such instances which needs some more attention and will get surely.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 06 Nov 2016 04:10:33 +0530
parents 8656dcac4ce9
children d524c88511a7
line wrap: on
line diff
--- a/mercurial/pure/osutil.py	Sun Nov 06 03:44:44 2016 +0530
+++ b/mercurial/pure/osutil.py	Sun Nov 06 04:10:33 2016 +0530
@@ -14,7 +14,11 @@
 import stat as statmod
 import sys
 
-from . import policy
+from . import (
+    policy,
+    pycompat,
+)
+
 modulepolicy = policy.policy
 policynocffi = policy.policynocffi
 
@@ -51,8 +55,8 @@
     '''
     result = []
     prefix = path
-    if not prefix.endswith(os.sep):
-        prefix += os.sep
+    if not prefix.endswith(pycompat.ossep):
+        prefix += pycompat.ossep
     names = os.listdir(path)
     names.sort()
     for fn in names: