changeset 23832:62f41f251e52

unpacker: check the right exception type for 2.4
author Matt Mackall <mpm@selenic.com>
date Tue, 13 Jan 2015 16:15:02 -0800
parents 0ab23a48b9a7
children 9b1d3bac61a7
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Sat Jan 10 18:00:57 2015 +0800
+++ b/mercurial/util.py	Tue Jan 13 16:15:02 2015 -0800
@@ -234,7 +234,7 @@
     try:
         # 2.5+
         return struct.Struct(fmt).unpack
-    except NameError:
+    except AttributeError:
         # 2.4
         return lambda buf: struct.unpack(fmt)