dabo Commit
Revision 4847
Date: 2008-12-17 03:11:36 -0800 (Wed, 17 Dec 2008)
Author: Cito
Trac: http://trac.dabodev.com/dabo/changeset/4847
Changed:
U trunk/dabo/ui/uiwx/dForm.py
Log:
Explicitly converting errors to str for inclusion in message strings is
unnecessary and fails if the error message is unicode with non-ascii characters.
Diff:
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2008-12-17 04:12:01 UTC (rev 4846)
+++ trunk/dabo/ui/uiwx/dForm.py 2008-12-17 11:11:36 UTC (rev 4847)
@@ -392,7 +392,7 @@
except dException.NoRecordsException, e:
dabo.errorLog.write(_("Cancel failed; no records to
cancel."))
except dException.dException, e:
- dabo.errorLog.write(_("Cancel failed with response:
%s") % str(e))
+ dabo.errorLog.write(_("Cancel failed with response:
%s") % e)
self.notifyUser(str(e), title=_("Cancel Not Allowed"),
exception=e)
self.afterCancel()
self.refresh()
@@ -464,12 +464,12 @@
sys.exit()
except dException.DBQueryException, e:
- dabo.errorLog.write(_("Database Execution failed with
response: %s") % str(e))
+ dabo.errorLog.write(_("Database Execution failed with
response: %s") % e)
self.notifyUser(str(e), title=_("Database Action
Failed"), severe=True, exception=e)
self.StatusText = ""
except dException.dException, e:
- dabo.errorLog.write(_("Requery failed with response:
%s") % str(e))
+ dabo.errorLog.write(_("Requery failed with response:
%s") % e)
self.notifyUser(str(e), title=_("Requery Not Allowed"),
severe=True, exception=e)
self.StatusText = ""
@@ -515,7 +515,7 @@
self.notifyUser(msg, title=_("Data Connection
Lost"), severe=True, exception=e)
sys.exit()
except dException.dException, e:
- dabo.errorLog.write(_("Delete failed with
response: %s") % str(e))
+ dabo.errorLog.write(_("Delete failed with
response: %s") % e)
self.notifyUser(str(e), title=_("Deletion Not
Allowed"), severe=True, exception=e)
self.afterDelete()
self.update()
@@ -548,7 +548,7 @@
self.notifyUser(msg, title=_("Data Connection
Lost"), severe=True, exception=e)
sys.exit()
except dException.dException, e:
- dabo.errorLog.write(_("Delete All failed with
response: %s") % str(e))
+ dabo.errorLog.write(_("Delete All failed with
response: %s") % e)
self.notifyUser(str(e), title=_("Deletion Not
Allowed"), severe=True, exception=e)
self.afterDeleteAll()
self.update()
@@ -571,7 +571,7 @@
try:
bizobj.new()
except dException.dException, e:
- self.notifyUser(_("Add new record failed with
response:\n\n%s") % str(e),
+ self.notifyUser(_("Add new record failed with
response:\n\n%s") % e,
severe=True, exception=e)
statusText = self.getCurrentRecordText(dataSource)
_______________________________________________
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]