diff options
author | Johan Dahlin <johan@gnome.org> | 2010-07-28 09:32:28 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-07-28 09:32:28 -0300 |
commit | 11fb7c9798c94ba8355fcc9ee4097dc5d2462f05 (patch) | |
tree | f4982a08c9b5fe337780c3cb118d40237ccb1c31 | |
parent | cbdd9ee09e367e4dd76d6d8a9a20bf714f794c20 (diff) | |
download | gobject-introspection-11fb7c9798c94ba8355fcc9ee4097dc5d2462f05.tar.gz |
[giscanner] Make warnings less dense
Omit ns=, context= and include the function symbol for Functions
-rw-r--r-- | giscanner/transformer.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 319e43cb..2f255211 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -147,11 +147,11 @@ If the warning is related to a Node type, see log_node_warning().""" if prefix: print >>sys.stderr, \ -'''%s: warning: ns=%r %s: %s''' % (position, self._namespace.name, - prefix, text) +'''%s: warning: %s: %s: %s''' % (position, self._namespace.name, + prefix, text) else: print >>sys.stderr, \ -'''%s: warning: ns=%r: %s''' % (position, self._namespace.name, text) +'''%s: warning: %s: %s''' % (position, self._namespace.name, text) def log_symbol_warning(self, symbol, text): """Log a warning in the context of the given symbol.""" @@ -172,7 +172,11 @@ context will be used.""" file_positions = node.file_positions if context: - text = "context=%r %s" % (context.name, text) + if isinstance(context, Function): + name = context.symbol + else: + name = context.name + text = "%s: %s" % (name, text) self.log_warning(text, file_positions) |