comparison mercurial/util.py @ 23864:6c44cef5baa2

unpacker: fix missing arg for py2.4
author Matt Mackall <mpm@selenic.com>
date Wed, 14 Jan 2015 16:57:00 -0800
parents 62f41f251e52
children 4e451d1359de
comparison
equal deleted inserted replaced
23863:669106fc5bb1 23864:6c44cef5baa2
234 try: 234 try:
235 # 2.5+ 235 # 2.5+
236 return struct.Struct(fmt).unpack 236 return struct.Struct(fmt).unpack
237 except AttributeError: 237 except AttributeError:
238 # 2.4 238 # 2.4
239 return lambda buf: struct.unpack(fmt) 239 return lambda buf: struct.unpack(fmt, buf)
240 240
241 def popen2(cmd, env=None, newlines=False): 241 def popen2(cmd, env=None, newlines=False):
242 # Setting bufsize to -1 lets the system decide the buffer size. 242 # Setting bufsize to -1 lets the system decide the buffer size.
243 # The default for bufsize is 0, meaning unbuffered. This leads to 243 # The default for bufsize is 0, meaning unbuffered. This leads to
244 # poor performance on Mac OS X: http://bugs.python.org/issue4194 244 # poor performance on Mac OS X: http://bugs.python.org/issue4194