Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
[maintransformer] Use AssertionError
Browse files Browse the repository at this point in the history
  • Loading branch information
boondocksaints-debug committed Sep 24, 2010
1 parent 33e12c4 commit 4e91e6b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions giscanner/maintransformer.py
Expand Up @@ -198,7 +198,7 @@ def _get_annotation_name(self, node):
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))
Expand Down Expand Up @@ -435,7 +435,7 @@ def _get_transfer_default_return(self, parent, node):
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
Expand Down Expand Up @@ -483,9 +483,6 @@ def _apply_annotations_param_ret_common(self, parent, node, tag):
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

Expand Down

0 comments on commit 4e91e6b

Please sign in to comment.