diff options
author | Guido van Rossum <guido@python.org> | 1997-01-11 19:22:11 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-11 19:22:11 +0000 |
commit | 265b5b3f038a0baa5924b3a312da1874e55587f2 (patch) | |
tree | ad309c6befa800d835a5c709fb84a6165f1b64ae /Lib/whichdb.py | |
parent | 88b85d4f6331001951000ba4125af52573421b4a (diff) | |
download | cpython-git-265b5b3f038a0baa5924b3a312da1874e55587f2.tar.gz |
Use new struct which supports standardized sizes
Diffstat (limited to 'Lib/whichdb.py')
-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 3722e41b96..8985062d5d 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: |