summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-05-01 03:51:50 -0700
committerColin Walters <walters@verbum.org>2015-09-29 23:16:33 -0400
commit749df9a4c0ad63069cac8c5d17325175584b20d4 (patch)
treeea1a4b3ac2abc15581c0ba8d361706726cae5b8b /giscanner/maintransformer.py
parent10175a1b54fff30291bbb5ff849dc3a048a4b8dc (diff)
downloadgobject-introspection-749df9a4c0ad63069cac8c5d17325175584b20d4.tar.gz
giscanner: Sort unknown parameters in error message
Sort the parameters displayed for the "unknown parameters" error message. The parameter names are stored in a set which returns a different ordering between Python 2 and 3 (set/dict ordering should not be relied upon anyhow). This fixes test failures in warning tests. https://bugzilla.gnome.org/show_bug.cgi?id=679438
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index fc59fa80..1a91c9fb 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -802,7 +802,8 @@ class MainTransformer(object):
(param, ) = unused
text = ", should be '%s'" % (param, )
else:
- text = ", should be one of %s" % (', '.join("'%s'" % p for p in unused), )
+ text = ", should be one of %s" % \
+ (', '.join("'%s'" % p for p in sorted(unused)), )
param = block.params.get(doc_name)
message.warn("%s: unknown parameter '%s' in documentation "