[gen] Various bugfixes.

This commit is contained in:
Gaetan Delannay 2013-04-16 19:56:47 +02:00
parent fb40913ef5
commit 0a8e06f1d9
4 changed files with 7 additions and 5 deletions

View file

@ -266,7 +266,7 @@ def formatNumber(n, sep=',', precision=2, tsep=' '):
try:
decPart = int(splitted[1])
if decPart != 0:
res += sep + str(decPart)
res += sep + splitted[1]
except ValueError:
# This exception may occur when the float value has an "exp"
# part, like in this example: 4.345e-05