diff options
Diffstat (limited to 'Lib/bsddb/db.py')
-rw-r--r-- | Lib/bsddb/db.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Lib/bsddb/db.py b/Lib/bsddb/db.py index c1749df..b2ee14e 100644 --- a/Lib/bsddb/db.py +++ b/Lib/bsddb/db.py @@ -37,8 +37,15 @@ # case we ever want to augment the stuff in _db in any way. For now # it just simply imports everything from _db. -from _bsddb import * -from _bsddb import __version__ +if __name__[:len('bsddb3.')] == 'bsddb3.': + # import _pybsddb binary as it should be the more recent version from + # a standalone pybsddb addon package than the version included with + # python as bsddb._bsddb. + from _pybsddb import * + from _pybsddb import __version__ +else: + from _bsddb import * + from _bsddb import __version__ -if version() < (3, 1, 0): - raise ImportError, "BerkeleyDB 3.x symbols not found. Perhaps python was statically linked with an older version?" +if version() < (3, 2, 0): + raise ImportError, "correct BerkeleyDB symbols not found. Perhaps python was statically linked with an older version?" |