[gobject-introspection] giscanner: Sort unknown parameters in error message
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: Sort unknown parameters in error message
- Date: Wed, 30 Sep 2015 03:35:56 +0000 (UTC)
commit 749df9a4c0ad63069cac8c5d17325175584b20d4
Author: Simon Feltman <sfeltman src gnome org>
Date: Thu May 1 03:51:50 2014 -0700
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
giscanner/maintransformer.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index fc59fa8..1a91c9f 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 "
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]