more tweaks, outline is lighter then the color given so compensate a bit.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 13 Feb 2012 11:14:12 +0000 (11:14 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 13 Feb 2012 11:14:12 +0000 (11:14 +0000)
release/scripts/modules/rna_xml.py

index c39d904..eae7840 100644 (file)
@@ -150,13 +150,14 @@ def rna2xml(fw=print_ln,
 
         # declare + attributes
         if pretty_format:
-            tmp_str = "<%s " % value_type_name
-            tmp_ident = "\n" + ident + (" " * len(tmp_str))
-
-            fw("%s%s%s>\n" % (ident, tmp_str, tmp_ident.join(node_attrs)))
-
-            del tmp_str
-            del tmp_ident
+            if node_attrs:
+                tmp_str = "<%s " % value_type_name
+                tmp_ident = "\n" + ident + (" " * len(tmp_str))
+                fw("%s%s%s>\n" % (ident, tmp_str, tmp_ident.join(node_attrs)))
+                del tmp_str
+                del tmp_ident
+            else:
+                fw("%s<%s>\n" % (ident, value_type_name))
         else:
             fw("%s<%s %s>\n" % (ident, value_type_name, " ".join(node_attrs)))