]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix import to work with either module name.
authorGregory P. Smith <greg@mad-scientist.com>
Thu, 9 Jun 2005 07:11:42 +0000 (07:11 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Thu, 9 Jun 2005 07:11:42 +0000 (07:11 +0000)
Lib/bsddb/test/test_compare.py

index 63afb4f59d071d3da24314d42038bb05bc4f23f5..59a45ec502a672a07a3727e8d81de3a1e37fccbd 100644 (file)
@@ -7,7 +7,12 @@ import test_all
 from cStringIO import StringIO
 
 import unittest
-from bsddb3 import db
+try:
+    # For Pythons w/distutils pybsddb
+    from bsddb3 import db, dbshelve
+except ImportError:
+    # For Python 2.3
+    from bsddb import db, dbshelve
 
 lexical_cmp = cmp