The last 16 lines of /usr/lib/python1.5/whichdb.py are currently (note that lines 5-7 should be between lines 13 and 15): # Check for BSD hash if magic in (0x00061561, 0x61150600): return "dbhash" # Check for BSD hash if magic in (0x00061561, 0x61150600): return "dbhash" # BSD hash v2 has a 12-byte NULL pad in front of the file type try: (magic,) = struct.unpack("=l", s16[-4:]) except struct.error: return "" # Unknown return "" This should read: # Check for BSD hash if magic in (0x00061561, 0x61150600): return "dbhash" # BSD hash v2 has a 12-byte NULL pad in front of the file type try: (magic,) = struct.unpack("=l", s16[-4:]) except struct.error: return "" # Check for BSD hash if magic in (0x00061561, 0x61150600): return "dbhash" # Unknown return "" otherwise, grabbing the magic number the second time has no effect and yeilds an unknown db every time.
<sigh>, thought I took that straight from Guido's note on the python bug tracking system. Fixing now, thanks for the note, will be in python-1.5.2-9 in the next rawhide.