dabo Commit
Revision 4696
Date: 2008-11-20 14:29:25 -0800 (Thu, 20 Nov 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4696
Changed:
U trunk/dabo/ui/uiwx/dTextBoxMixin.py
Log:
Fixed error in converting invalid decimal input observed and reported by
John Fabiani (thanks!).
Diff:
Modified: trunk/dabo/ui/uiwx/dTextBoxMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dTextBoxMixin.py 2008-11-20 14:49:18 UTC (rev 4695)
+++ trunk/dabo/ui/uiwx/dTextBoxMixin.py 2008-11-20 22:29:25 UTC (rev 4696)
@@ -452,6 +452,13 @@
_oldVal = self._oldVal
except AttributeError:
_oldVal = None
+
+ # Preprocess trying to do a decimal conversion, to
filter out
+ # invalid input before doing a number of things below:
+ try:
+ decimal.Decimal(strVal)
+ except decimal.InvalidOperation:
+ raise ValueError, _("Invalid decimal value.")
try:
if type(_oldVal) == decimal.Decimal:
_______________________________________________
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]