]> granicus.if.org Git - python/commitdiff
Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer.
authorGuido van Rossum <guido@python.org>
Tue, 28 Apr 1998 15:41:03 +0000 (15:41 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 28 Apr 1998 15:41:03 +0000 (15:41 +0000)
Lib/whichdb.py

index 3186edf1a78dfa707a0171d37dc6a26eef738f40..c072e5bdbe8696cefe1bf0c610d28dc3a84a6e2d 100644 (file)
@@ -50,7 +50,7 @@ def whichdb(filename):
         return "gdbm"
 
     # Check for BSD hash
-    if magic == 0x061561:
+    if magic in (0x00061561, 0x61150600):
         return "dbhash"
 
     # Unknown