##// END OF EJS Templates
util: drop the compatibility with Python 2.4 unpacker...
Pierre-Yves David -
r25209:277a535c default
parent child Browse files
Show More
@@ -234,12 +234,7 b" closefds = os.name == 'posix'"
234
234
235 def unpacker(fmt):
235 def unpacker(fmt):
236 """create a struct unpacker for the specified format"""
236 """create a struct unpacker for the specified format"""
237 try:
237 return struct.Struct(fmt).unpack
238 # 2.5+
239 return struct.Struct(fmt).unpack
240 except AttributeError:
241 # 2.4
242 return lambda buf: struct.unpack(fmt, buf)
243
238
244 def popen2(cmd, env=None, newlines=False):
239 def popen2(cmd, env=None, newlines=False):
245 # Setting bufsize to -1 lets the system decide the buffer size.
240 # Setting bufsize to -1 lets the system decide the buffer size.
General Comments 0
You need to be logged in to leave comments. Login now