summaryrefslogtreecommitdiffstats
path: root/Lib/whichdb.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-28 15:41:03 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-28 15:41:03 (GMT)
commitb86ba124eab06ab9b132647bee4c00c13269e185 (patch)
tree641bc259d67c15aff3732daa1a28d80c6f5502b3 /Lib/whichdb.py
parent2aefe8d7c00c82e9c8108d22cf1ff29a41de2c5b (diff)
downloadcpython-b86ba124eab06ab9b132647bee4c00c13269e185.zip
cpython-b86ba124eab06ab9b132647bee4c00c13269e185.tar.gz
cpython-b86ba124eab06ab9b132647bee4c00c13269e185.tar.bz2
Support byte-swapped dbhash (bsddb) files. Found by Ben Sayer.
Diffstat (limited to 'Lib/whichdb.py')
-rw-r--r--Lib/whichdb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/whichdb.py b/Lib/whichdb.py
index 3186edf..c072e5b 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