[gobject-introspection] [giscanner] Make warnings less dense
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] [giscanner] Make warnings less dense
- Date: Wed, 28 Jul 2010 12:34:33 +0000 (UTC)
commit 11fb7c9798c94ba8355fcc9ee4097dc5d2462f05
Author: Johan Dahlin <johan gnome org>
Date: Wed Jul 28 09:32:28 2010 -0300
[giscanner] Make warnings less dense
Omit ns=, context= and include the function symbol for Functions
giscanner/transformer.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 319e43c..2f25521 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]