diff options
author | Guido van Rossum <guido@python.org> | 1997-01-11 19:22:11 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-11 19:22:11 (GMT) |
commit | 265b5b3f038a0baa5924b3a312da1874e55587f2 (patch) | |
tree | ad309c6befa800d835a5c709fb84a6165f1b64ae | |
parent | 88b85d4f6331001951000ba4125af52573421b4a (diff) | |
download | cpython-265b5b3f038a0baa5924b3a312da1874e55587f2.zip cpython-265b5b3f038a0baa5924b3a312da1874e55587f2.tar.gz cpython-265b5b3f038a0baa5924b3a312da1874e55587f2.tar.bz2 |
Use new struct which supports standardized sizes
-rw-r--r-- | Lib/whichdb.py | 7 |
1 files changed, 2 insertions, 5 deletions
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 @@ def whichdb(filename): # 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: |