Author: mtredinnick
Date: 2009-03-01 01:12:38 -0600 (Sun, 01 Mar 2009)
New Revision: 9930

Modified:
   django/trunk/django/db/__init__.py
Log:
Fixed #8706 -- Improved the way we detect available database backends.

Thanks, [email protected].

Modified: django/trunk/django/db/__init__.py
===================================================================
--- django/trunk/django/db/__init__.py  2009-03-01 06:54:38 UTC (rev 9929)
+++ django/trunk/django/db/__init__.py  2009-03-01 07:12:38 UTC (rev 9930)
@@ -25,7 +25,8 @@
         # listing all possible (built-in) database backends.
         backend_dir = os.path.join(__path__[0], 'backends')
         try:
-            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')]
+            available_backends = [f for f in os.listdir(backend_dir)
+                    if os.path.isdir(os.path.join(backend_dir, f))]
         except EnvironmentError:
             available_backends = []
         available_backends.sort()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to