From: Gregory P. Smith Date: Sun, 29 Jan 2006 23:54:38 +0000 (+0000) Subject: fix test import for use in standalone pybsddb project bsddb3 module as well X-Git-Tag: v2.5a0~730 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c26cf5a6f16c7a2e10ed13dcb4daa083981e4d85;p=thirdparty%2FPython%2Fcpython.git fix test import for use in standalone pybsddb project bsddb3 module as well as python builtin bsddb. --- diff --git a/Lib/bsddb/test/test_1413192.py b/Lib/bsddb/test/test_1413192.py index 45afb36f2432..3c135365c954 100644 --- a/Lib/bsddb/test/test_1413192.py +++ b/Lib/bsddb/test/test_1413192.py @@ -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 = '.'