# HG changeset patch
# User Laurent Bessard
# Date 1384381526 -3600
# Node ID dc94c71a2f2512cc667335b298a878179ff1b018
# Parent  1eefc427419feba0aeb43ae726a0ce3329f7d896
Fixed bug with decimal value string formatting

diff -r 1eefc427419f -r dc94c71a2f25 xmlclass/xsdschema.py
--- a/xmlclass/xsdschema.py	Mon Nov 11 00:59:19 2013 +0100
+++ b/xmlclass/xsdschema.py	Wed Nov 13 23:25:26 2013 +0100
@@ -52,10 +52,12 @@
         if name is not None:
             ind1, ind2 = getIndent(indent, name)
             text += ind1 + "<%s>" % name
-        if value in extra_values or value % 1 != 0 or isinstance(value, IntType):
+        if isinstance(value, IntType):
+            text += str(value)
+        elif value in extra_values or value % 1 != 0:
             text += float_format(value)
         else:
-            text += "%.0f" % value
+            text += "{:.0f}".format(value)
         if name is not None:
             text += "</%s>\n" % name
         return text