summaryrefslogtreecommitdiff
path: root/Lib/bsddb/test/test_all.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test/test_all.py')
-rw-r--r--Lib/bsddb/test/test_all.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py
index ad8b1e9e94..0b132f49cc 100644
--- a/Lib/bsddb/test/test_all.py
+++ b/Lib/bsddb/test/test_all.py
@@ -41,8 +41,12 @@ class PrintInfoFakeTest(unittest.TestCase):
# This little hack is for when this module is run as main and all the
# other modules import it so they will still be able to get the right
# verbose setting. It's confusing but it works.
-import test_all
-test_all.verbose = verbose
+try:
+ import test_all
+except ImportError:
+ pass
+else:
+ test_all.verbose = verbose
def suite():