From: Guido van Rossum Date: Tue, 28 Apr 1998 15:41:03 +0000 (+0000) Subject: Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer. X-Git-Tag: v1.5.2a1~801 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b86ba124eab06ab9b132647bee4c00c13269e185;p=thirdparty%2FPython%2Fcpython.git Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer. --- diff --git a/Lib/whichdb.py b/Lib/whichdb.py index 3186edf1a78d..c072e5bdbe86 100644 --- a/Lib/whichdb.py +++ b/Lib/whichdb.py @@ -50,7 +50,7 @@ def whichdb(filename): return "gdbm" # Check for BSD hash - if magic == 0x061561: + if magic in (0x00061561, 0x61150600): return "dbhash" # Unknown