##// END OF EJS Templates
codemod: use pycompat.isposix...
Jun Wu -
r34647:238abf65 default
parent child Browse files
Show More
@@ -83,7 +83,7 b' def _usercachedir(ui):'
83 home = encoding.environ.get('HOME')
83 home = encoding.environ.get('HOME')
84 if home:
84 if home:
85 return os.path.join(home, 'Library', 'Caches', longname)
85 return os.path.join(home, 'Library', 'Caches', longname)
86 elif pycompat.osname == 'posix':
86 elif pycompat.isposix:
87 path = encoding.environ.get('XDG_CACHE_HOME')
87 path = encoding.environ.get('XDG_CACHE_HOME')
88 if path:
88 if path:
89 return os.path.join(path, longname)
89 return os.path.join(path, longname)
@@ -313,7 +313,7 b' except NameError:'
313 return memoryview(sliceable)[offset:offset + length]
313 return memoryview(sliceable)[offset:offset + length]
314 return memoryview(sliceable)[offset:]
314 return memoryview(sliceable)[offset:]
315
315
316 closefds = pycompat.osname == 'posix'
316 closefds = pycompat.isposix
317
317
318 _chunksize = 4096
318 _chunksize = 4096
319
319
@@ -53,7 +53,7 b' def _numworkers(ui):'
53 raise error.Abort(_('number of cpus must be an integer'))
53 raise error.Abort(_('number of cpus must be an integer'))
54 return min(max(countcpus(), 4), 32)
54 return min(max(countcpus(), 4), 32)
55
55
56 if pycompat.osname == 'posix':
56 if pycompat.isposix:
57 _startupcost = 0.01
57 _startupcost = 0.01
58 else:
58 else:
59 _startupcost = 1e30
59 _startupcost = 1e30
General Comments 0
You need to be logged in to leave comments. Login now