From: richard Date: Mon, 30 Jul 2001 03:52:16 +0000 (+0000) Subject: Checks for ability to import the specific back-end module. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6d0c98289e66aacf10317c54f7c3a40bde52b709;p=roundup.git Checks for ability to import the specific back-end module. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@165 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/__init__.py b/roundup/backends/__init__.py index d2b20d2..98bf8eb 100644 --- a/roundup/backends/__init__.py +++ b/roundup/backends/__init__.py @@ -1,4 +1,26 @@ -import back_bsddb; bsddb = back_bsddb -import back_anydbm; anydbm = back_anydbm +__all__ = [] + +try: + import back_anydbm + anydbm = back_anydbm + del back_anydbm + __all__.append('anydbm') +except: + pass + +try: + import back_bsddb + bsddb = back_bsddb + del back_bsddb + __all__.append('bsddb') +except: + pass + +try: + import back_bsddb3 + bsddb3 = back_bsddb3 + del back_bsddb3 + __all__.append('bsddb3') +except: + pass -__all__ = ['bsddb', 'anydbm']