commit | 265b5b3f038a0baa5924b3a312da1874e55587f2 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Sat Jan 11 19:22:11 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Sat Jan 11 19:22:11 1997 +0000 |
tree | ad309c6befa800d835a5c709fb84a6165f1b64ae | |
parent | 88b85d4f6331001951000ba4125af52573421b4a [diff] [blame] |
Use new struct which supports standardized sizes
diff --git a/Lib/whichdb.py b/Lib/whichdb.py index 3722e41..8985062 100644 --- a/Lib/whichdb.py +++ b/Lib/whichdb.py
@@ -41,12 +41,9 @@ # Convert to 4-byte int in native byte order -- return "" if impossible try: - (magic,) = struct.unpack("l", s) + (magic,) = struct.unpack("=l", s) except struct.error: - try: - (magic,) = struct.unpack("i", s) - except struct.error: - return "" + return "" # Check for GNU dbm if magic == 0x13579ace: