fix test import for use in standalone pybsddb project bsddb3 module as well

as python builtin bsddb.
This commit is contained in:
Gregory P. Smith 2006-01-29 23:54:38 +00:00
parent 249c7b050b
commit c26cf5a6f1
1 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,12 @@
# This test relies on the variable names, see the bug report for details.
# The problem was that the env was deallocated prior to the txn.
from bsddb import db
try:
# For Pythons w/distutils and add-on pybsddb
from bsddb3 import db
except ImportError:
# For Python >= 2.3 builtin bsddb distribution
from bsddb import db
env_name = '.'