Ticket #8238: db.diff
File db.diff, 1.0 KB (added by , 16 years ago) |
---|
-
db/__init__.py
24 24 # The database backend wasn't found. Display a helpful error message 25 25 # listing all possible (built-in) database backends. 26 26 backend_dir = os.path.join(__path__[0], 'backends') 27 available_backends = [f for f in os.listdir(backend_dir) if not f.startswith('_') and not f.startswith('.') and not f.endswith('.py') and not f.endswith('.pyc')] 27 try: 28 available_backends = [f for f in os.listdir(backend_dir) if not f.startswith('_') and not f.startswith('.') and not f.endswith('.py') and not f.endswith('.pyc')] 29 except EnvironmentError: 30 available_backends = [] 28 31 available_backends.sort() 29 32 if settings.DATABASE_ENGINE not in available_backends: 30 33 raise ImproperlyConfigured, "%r isn't an available database backend. Available options are: %s\nError was: %s" % \