dabo Commit
Revision 5016
Date: 2009-02-02 11:25:31 -0800 (Mon, 02 Feb 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5016
Changed:
U trunk/dabo/ui/uiwx/dTextBoxMixin.py
Log:
Fix to handle decimal.InvalidOperation as well.
Diff:
Modified: trunk/dabo/ui/uiwx/dTextBoxMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dTextBoxMixin.py 2009-02-02 18:13:02 UTC (rev 5015)
+++ trunk/dabo/ui/uiwx/dTextBoxMixin.py 2009-02-02 19:25:31 UTC (rev 5016)
@@ -469,7 +469,7 @@
retVal =
decimal.DefaultContext.quantize(decimal.Decimal(strVal), _oldVal)
else:
retVal = decimal.Decimal(strVal)
- except ValueError:
+ except (ValueError, decimal.InvalidOperation):
raise ValueError(_("Can't convert to decimal."))
elif dataType in (tuple, list):
retVal = eval(strVal)
_______________________________________________
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]