From 429131c2ffe3fd69d3f29a66ae7eb9ea127b4e72 Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Tue, 11 Sep 2012 22:57:18 -0400 Subject: Sort attribute names in test output --- itstool.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itstool.in b/itstool.in index ed43754..82c9a2a 100755 --- a/itstool.in +++ b/itstool.in @@ -1128,8 +1128,8 @@ class Document (object): sys.stderr.write('Error: Unrecognized category %s\n' % category) sys.exit(1) out.write('%s\t%s\n' % (xml_get_node_path(node), compval)) - for child in xml_attr_iter(node): - self.output_test_data(category, out, child) + for attr in sorted(xml_attr_iter(node), lambda x, y: cmp(str(x), str(y))): + self.output_test_data(category, out, attr) for child in xml_child_iter(node): if child.type == 'element': self.output_test_data(category, out, child) -- cgit v1.2.1