Commit b40c463a authored by Moshe Zadka's avatar Moshe Zadka

Added support to recognize Python's internal "dumbdbm" database.

This closes bug 200 on Jitterbug.
parent ca361d9e
...@@ -25,6 +25,18 @@ def whichdb(filename): ...@@ -25,6 +25,18 @@ def whichdb(filename):
except IOError: except IOError:
pass pass
# Check for dumbdbm next -- this has a .dir and and a .dat file
f = open(filename + ".dat", "rb")
f.close()
f = open(filename + ".dir", "rb")
try:
if f.read(1) in ["'", '"']:
return "dumbdbm"
finally:
f.close()
except IOError:
pass
# See if the file exists, return None if not # See if the file exists, return None if not
try: try:
f = open(filename, "rb") f = open(filename, "rb")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment