comparison mercurial/pure/osutil.py @ 30639:d524c88511a7

py3: replace os.name with pycompat.osname (part 1 of 2) os.name returns unicodes on py3 and we have pycompat.osname which returns bytes. This series of 2 patches will change every ocurrence of os.name with pycompat.osname.
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Dec 2016 00:16:52 +0530
parents ba2c04059317
children e995f00a9e9a
comparison
equal deleted inserted replaced
30638:1c5cbf28f007 30639:d524c88511a7
157 # much we can do about that 157 # much we can do about that
158 return ret 158 return ret
159 else: 159 else:
160 listdir = listdirpure 160 listdir = listdirpure
161 161
162 if os.name != 'nt': 162 if pycompat.osname != 'nt':
163 posixfile = open 163 posixfile = open
164 164
165 _SCM_RIGHTS = 0x01 165 _SCM_RIGHTS = 0x01
166 _socklen_t = ctypes.c_uint 166 _socklen_t = ctypes.c_uint
167 167