dabo Commit
Revision 5955
Date: 2010-08-09 08:39:55 -0700 (Mon, 09 Aug 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5955

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

Log:
Fixed a poor attempt at handling unicode in error notifications. Part of #1365.


Diff:
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2010-08-05 16:23:08 UTC (rev 5954)
+++ trunk/dabo/ui/uiwx/dForm.py 2010-08-09 15:39:55 UTC (rev 5955)
@@ -399,18 +399,13 @@
                        self.setStatusText(_("Nothing to save!"))
                        return True
                        
-               except dException.BusinessRuleViolation, e:
+               except (dException.BusinessRuleViolation, 
dException.DBQueryException), e:
                        self.setStatusText(_("Save failed."))
-                       msg = "%s:\n\n%s" % (_("Save Failed"), 
self.Application.str2Unicode(e))
+                       txt = _("Save Failed")
+                       msg = "%(txt)s:\n\n%(e)s" % locals()
                        self.notifyUser(msg, severe=True, exception=e)
                        return False
 
-               except dException.DBQueryException, e:
-                       self.setStatusText(_("Save failed."))
-                       msg = "%s:\n\n%s" % (_("Save Failed"), e)
-                       self.notifyUser(msg, severe=True, exception=e)
-                       return False
-
                self.afterSave()
                self.refresh()
                return True



_______________________________________________
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