# HG changeset patch # User Pierre-Yves David # Date 1431986061 18000 # Node ID 277a535c0b3a48813e55a485a13545f91b2ea3b7 # Parent 5a6820f8da4dcf0b024b0d641ae58d988ee0bdc6 util: drop the compatibility with Python 2.4 unpacker Python 2.4 compatibility have packed and sailed. diff -r 5a6820f8da4d -r 277a535c0b3a mercurial/util.py --- a/mercurial/util.py Mon May 18 16:52:28 2015 -0500 +++ b/mercurial/util.py Mon May 18 16:54:21 2015 -0500 @@ -234,12 +234,7 @@ def unpacker(fmt): """create a struct unpacker for the specified format""" - try: - # 2.5+ - return struct.Struct(fmt).unpack - except AttributeError: - # 2.4 - return lambda buf: struct.unpack(fmt, buf) + return struct.Struct(fmt).unpack def popen2(cmd, env=None, newlines=False): # Setting bufsize to -1 lets the system decide the buffer size.