From aee3fc44045e9ae7c2fe73d80adddfb51fb83f0b Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sat, 29 Nov 2014 09:17:23 -0600 Subject: fix struct.unpack bug reported by mingi wu --- lecroy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lecroy.py') diff --git a/lecroy.py b/lecroy.py index 22e4f13..36e405c 100644 --- a/lecroy.py +++ b/lecroy.py @@ -165,7 +165,7 @@ class LeCroyScope(sock.Socket): # check endian data.seek(startpos + 34) - if struct.unpack('<'+Enum.packfmt, data.read(Enum.length)) == 0: + if struct.unpack('<'+Enum.packfmt, data.read(Enum.length))[0] == 0: endian = '>' wavedesc['little_endian'] = True np.little_endian = True -- cgit