summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2010-09-24 09:57:06 -0300
committerJohan Dahlin <johan@gnome.org>2010-09-24 11:03:52 -0300
commit4e91e6bd19c0389237c0be68e44afef70d1ccd22 (patch)
tree2e456152b322cea386703a903cf4d5579ba3ebf3 /giscanner
parent33e12c4a144f97b295e0e7ba560042d071a5f7d6 (diff)
downloadgobject-introspection-4e91e6bd19c0389237c0be68e44afef70d1ccd22.tar.gz
[maintransformer] Use AssertionError
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/maintransformer.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index a670a0a2..03649867 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -198,7 +198,7 @@ usage is void (*_gtk_reserved1)(void);"""
elif isinstance(node, ast.Registered) and node.gtype_name is not None:
return node.gtype_name
return node.c_name
- assert False, "Unhandled node %r" % (node, )
+ raise AssertionError("Unhandled node %r" % (node, ))
def _get_block(self, node):
return self._blocks.get(self._get_annotation_name(node))
@@ -435,7 +435,7 @@ usage is void (*_gtk_reserved1)(void);"""
elif isinstance(target, (ast.Record, ast.Union)):
return ast.PARAM_TRANSFER_FULL
else:
- assert False, "Invalid constructor"
+ raise AssertionError("Invalid constructor")
elif isinstance(target, (ast.Class, ast.Record, ast.Union)):
# Explicitly no default for these
return None
@@ -483,9 +483,6 @@ usage is void (*_gtk_reserved1)(void);"""
caller_allocates = True
elif subtype == 'callee-allocates':
caller_allocates = False
- else:
- message.fatal("out allocation for %s is invalid (%r)" % (
- node, subtype))
elif OPT_IN in options:
annotated_direction = ast.PARAM_DIRECTION_IN