Author: mtredinnick
Date: 2008-09-17 02:23:17 -0500 (Wed, 17 Sep 2008)
New Revision: 9060

Modified:
   django/trunk/django/db/backends/sqlite3/base.py
Log:
Fixed #9113 -- Improved exception message reporting when importing sqlite3 
fails.


Modified: django/trunk/django/db/backends/sqlite3/base.py
===================================================================
--- django/trunk/django/db/backends/sqlite3/base.py     2008-09-17 06:59:24 UTC 
(rev 9059)
+++ django/trunk/django/db/backends/sqlite3/base.py     2008-09-17 07:23:17 UTC 
(rev 9060)
@@ -14,16 +14,17 @@
 try:
     try:
         from sqlite3 import dbapi2 as Database
-    except ImportError:
+    except ImportError, e1:
         from pysqlite2 import dbapi2 as Database
-except ImportError, e:
+except ImportError, exc:
     import sys
     from django.core.exceptions import ImproperlyConfigured
     if sys.version_info < (2, 5, 0):
         module = 'pysqlite2'
     else:
         module = 'sqlite3'
-    raise ImproperlyConfigured, "Error loading %s module: %s" % (module, e)
+        exc = e1
+    raise ImproperlyConfigured, "Error loading %s module: %s" % (module, exc)
 
 try:
     import decimal


--~--~---------~--~----~------------~-------~--~----~
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