dabo Commit
Revision 5103
Date: 2009-03-01 18:42:38 -0800 (Sun, 01 Mar 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5103

Changed:
U   trunk/dabo/ui/uiwx/dFormMixin.py

Log:
Modified the code that reads in connection info. Previously, if the named 
connection didn't exist, the form would crash. This prevented editing of Class 
Designer forms on systems that did not have the same database access as the 
systems on which the code would eventually be deployed.


Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py    2009-03-02 02:41:01 UTC (rev 5102)
+++ trunk/dabo/ui/uiwx/dFormMixin.py    2009-03-02 02:42:38 UTC (rev 5103)
@@ -128,7 +128,10 @@
                self._normTop = self.Top
 
                if self._cxnName:
-                       self.Connection = app.getConnectionByName(self._cxnName)
+                       try:
+                               self.Connection = 
app.getConnectionByName(self._cxnName)
+                       except dException.ConnectionNotFoundException:
+                               self.Connection = None
                        if self.Connection is None:
                                dabo.infoLog.write(_("Could not establish 
connection '%s'") %
                                                self._cxnName)



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to