Author: jcater
Date: 2005-04-24 15:34:22 -0500 (Sun, 24 Apr 2005)
New Revision: 7479

Modified:
   trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
Log:
If a needed dbsig2 python module isn't installed and is needed, raise a 
ConnectError instead of an ImportError, so our error handlers behave correctly. 



Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py      
2005-04-24 11:32:07 UTC (rev 7478)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py      
2005-04-24 20:34:22 UTC (rev 7479)
@@ -82,7 +82,10 @@
 
     Base.Connection.__init__ (self, connections, name, parameters)
 
-    self._driver = __import__ (self._drivername, None, None, '*')
+    try:
+      self._driver = __import__ (self._drivername, None, None, '*')
+    except ImportError:
+      raise Exceptions.ConnectError, _("The '%s' python module is not 
installed.") % self._drivername
 
     # Encoding used to communicate with the database (not used by all drivers)
     if parameters.has_key ('encoding'):



_______________________________________________
Commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to