util: drop the compatibility with Python 2.4 unpacker
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 18 May 2015 16:54:21 -0500
changeset 25209 277a535c0b3a
parent 25208 5a6820f8da4d
child 25210 b58dde1bb32f
util: drop the compatibility with Python 2.4 unpacker Python 2.4 compatibility have packed and sailed.
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.