comparison mercurial/pycompat.py @ 31775:8181f378b073

pycompat: provide bytes os.linesep
author Yuya Nishihara <yuya@tcha.org>
date Wed, 29 Mar 2017 21:23:28 +0900
parents 7d2cbe11ae48
children 45761ef1bc93
comparison
equal deleted inserted replaced
31774:7d2cbe11ae48 31775:8181f378b073
40 import struct 40 import struct
41 41
42 fsencode = os.fsencode 42 fsencode = os.fsencode
43 fsdecode = os.fsdecode 43 fsdecode = os.fsdecode
44 # A bytes version of os.name. 44 # A bytes version of os.name.
45 oslinesep = os.linesep.encode('ascii')
45 osname = os.name.encode('ascii') 46 osname = os.name.encode('ascii')
46 ospathsep = os.pathsep.encode('ascii') 47 ospathsep = os.pathsep.encode('ascii')
47 ossep = os.sep.encode('ascii') 48 ossep = os.sep.encode('ascii')
48 osaltsep = os.altsep 49 osaltsep = os.altsep
49 if osaltsep: 50 if osaltsep:
229 return getopt.getopt(args, shortlist, namelist) 230 return getopt.getopt(args, shortlist, namelist)
230 231
231 strkwargs = identity 232 strkwargs = identity
232 byteskwargs = identity 233 byteskwargs = identity
233 234
235 oslinesep = os.linesep
234 osname = os.name 236 osname = os.name
235 ospathsep = os.pathsep 237 ospathsep = os.pathsep
236 ossep = os.sep 238 ossep = os.sep
237 osaltsep = os.altsep 239 osaltsep = os.altsep
238 stdin = sys.stdin 240 stdin = sys.stdin