changeset 25209:277a535c0b3a

util: drop the compatibility with Python 2.4 unpacker Python 2.4 compatibility have packed and sailed.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 18 May 2015 16:54:21 -0500
parents 5a6820f8da4d
children b58dde1bb32f
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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.