index 2c181a2e3d1f55e727c08b42ba4e83ffc28a74b1..931de121f1d577a8ae662a240b8ee9bec1c0c10b 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: __init__.py,v 1.8 2001-12-10 22:20:01 richard Exp $
+# $Id: __init__.py,v 1.16 2002-09-10 00:11:49 richard Exp $
__all__ = []
try:
- import anydbm, dumbdbm
- # dumbdbm in python 2,2b2, 2.1.1 and earlier is seriously broken
- assert anydbm._defaultmod != dumbdbm
- del anydbm
- del dumbdbm
+ import sys, anydbm
+ if not hasattr(sys, 'version_info') or sys.version_info < (2,1,2):
+ import dumbdbm
+ # dumbdbm only works in python 2.1.2+
+ assert anydbm._defaultmod != dumbdbm
+ del anydbm
+ del dumbdbm
+except AssertionError:
+ print "WARNING: you should upgrade to python 2.1.3"
+except ImportError, message:
+ if str(message) != 'No module named anydbm': raise
+else:
import back_anydbm
anydbm = back_anydbm
__all__.append('anydbm')
-except AssertionError:
- del back_anydbm
-except:
- pass
try:
+ import gadfly
+except ImportError, message:
+ if str(message) != 'No module named gadfly': raise
+else:
+ import back_gadfly
+ gadfly = back_gadfly
+ __all__.append('gadfly')
+
+try:
+ import bsddb
+except ImportError, message:
+ if str(message) != 'No module named bsddb': raise
+else:
import back_bsddb
bsddb = back_bsddb
__all__.append('bsddb')
-except:
- pass
try:
+ import bsddb3
+except ImportError, message:
+ if str(message) != 'No module named bsddb3': raise
+else:
import back_bsddb3
bsddb3 = back_bsddb3
__all__.append('bsddb3')
-except:
- pass
-#
-# $Log: not supported by cvs2svn $
-# Revision 1.7 2001/12/10 00:57:38 richard
-# From CHANGES:
-# . Added the "display" command to the admin tool - displays a node's values
-# . #489760 ] [issue] only subject
-# . fixed the doc/index.html to include the quoting in the mail alias.
-#
-# Also:
-# . fixed roundup-admin so it works with transactions
-# . disabled the back_anydbm module if anydbm tries to use dumbdbm
-#
-# Revision 1.6 2001/08/07 00:24:42 richard
-# stupid typo
-#
-# Revision 1.5 2001/08/07 00:15:51 richard
-# Added the copyright/license notice to (nearly) all files at request of
-# Bizar Software.
-#
-#
-#
+try:
+ import metakit
+except ImportError, message:
+ if str(message) != 'No module named metakit': raise
+else:
+ import back_metakit
+ metakit = back_metakit
+ __all__.append('metakit')
+
# vim: set filetype=python ts=4 sw=4 et si