*** GDataFormatter.py 2009-08-11 09:46:29.000000000 +0300 --- GDataFormatter_snigelgr.py 2009-08-07 20:13:01.000000000 +0300 *************** *** 30,39 **** # from types import * from gnue.common.external.fixedpoint import FixedPoint, addHalfAndChop FixedPoint.round = addHalfAndChop - def applyFormatting (value, mask): # This obviously doesn't do anything with the mask yet # Just returns a string --- 30,39 ---- # from types import * + import decimal from gnue.common.external.fixedpoint import FixedPoint, addHalfAndChop FixedPoint.round = addHalfAndChop def applyFormatting (value, mask): # This obviously doesn't do anything with the mask yet # Just returns a string *************** *** 49,55 **** pass # TODO: As said above, this is a bad hack w/a lot of assumptions ! if type(value) == FloatType: v = mask.split('.',1) try: dec = len(v[1]) --- 49,55 ---- pass # TODO: As said above, this is a bad hack w/a lot of assumptions ! if isinstance(value, decimal.Decimal): v = mask.split('.',1) try: dec = len(v[1])