From: Gregory P. Smith Date: Thu, 9 Jun 2005 07:11:42 +0000 (+0000) Subject: fix import to work with either module name. X-Git-Tag: v2.5a0~1721 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6564ca72add45b1719ed6ff331022eb72a60340d;p=thirdparty%2FPython%2Fcpython.git fix import to work with either module name. --- diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index 63afb4f59d07..59a45ec502a6 100644 --- a/Lib/bsddb/test/test_compare.py +++ b/Lib/bsddb/test/test_compare.py @@ -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