summaryrefslogtreecommitdiff
path: root/giscanner/message.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2012-04-03 08:08:45 +0200
committerJohan Dahlin <jdahlin@litl.com>2012-04-05 10:23:02 -0300
commit182fdfec261f36fa095484352b9b834861036907 (patch)
tree47756b386f2eae5cf99cf345dc841606824708f7 /giscanner/message.py
parent5ab6a478f5fe7642090032e3345f8c884e15f5b7 (diff)
downloadgobject-introspection-182fdfec261f36fa095484352b9b834861036907.tar.gz
Now make AnnotationParser do what gobject-introspection needs it to do.
https://bugzilla.gnome.org/show_bug.cgi?id=672254
Diffstat (limited to 'giscanner/message.py')
-rw-r--r--giscanner/message.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/giscanner/message.py b/giscanner/message.py
index 1f7195de..8a948cd3 100644
--- a/giscanner/message.py
+++ b/giscanner/message.py
@@ -90,7 +90,7 @@ class MessageLogger(object):
def log(self, log_type, text, positions=None, prefix=None):
"""Log a warning, using optional file positioning information.
-If the warning is related to a ast.Node type, see log_node_warning()."""
+If the warning is related to a ast.Node type, see log_node()."""
utils.break_on_debug_flag('warning')
self._warning_count += 1
@@ -123,8 +123,12 @@ If the warning is related to a ast.Node type, see log_node_warning()."""
'''%s: %s: %s: %s: %s\n''' % (last_position, error_type, self._namespace.name,
prefix, text))
else:
- text = (
+ if self._namespace:
+ text = (
'''%s: %s: %s: %s\n''' % (last_position, error_type, self._namespace.name, text))
+ else:
+ text = (
+'''%s: %s: %s\n''' % (last_position, error_type, text))
self._output.write(text)
if log_type == FATAL: