Mercurial > p > roundup > code
comparison roundup/backends/__init__.py @ 2749:2f27ec0a8ebb maint-0.7
what's in a name?
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 11 Oct 2004 05:46:12 +0000 |
| parents | 3f89c8ffe4f1 |
| children |
comparison
equal
deleted
inserted
replaced
| 2748:fc9b8522a4bc | 2749:2f27ec0a8ebb |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: __init__.py,v 1.27 2004-04-05 23:43:03 richard Exp $ | 18 # $Id: __init__.py,v 1.27.2.1 2004-10-11 05:46:12 richard Exp $ |
| 19 | 19 |
| 20 '''Container for the hyperdb storage backend implementations. | 20 '''Container for the hyperdb storage backend implementations. |
| 21 | 21 |
| 22 The __all__ variable is constructed containing only the backends which are | 22 The __all__ variable is constructed containing only the backends which are |
| 23 available. | 23 available. |
| 34 backend_module = backend | 34 backend_module = backend |
| 35 try: | 35 try: |
| 36 globals()[backend] = __import__('back_%s'%backend, globals()) | 36 globals()[backend] = __import__('back_%s'%backend, globals()) |
| 37 __all__.append(backend) | 37 __all__.append(backend) |
| 38 except ImportError, e: | 38 except ImportError, e: |
| 39 if not str(e).startswith('No module named %s'%backend_module): | 39 if str(e).startswith('No module named %s'%backend_module): |
| 40 raise | 40 continue |
| 41 if str(e).startswith('No module named %s'%backend): | |
| 42 continue | |
| 43 raise | |
| 41 | 44 |
| 42 # vim: set filetype=python ts=4 sw=4 et si | 45 # vim: set filetype=python ts=4 sw=4 et si |
