summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-05-02 20:02:29 (GMT)
committerGeorg Brandl <georg@python.org>2007-05-02 20:02:29 (GMT)
commitb8ae3d01389f1b079303516aca24f61005c89ee1 (patch)
treea4c75aa02e4a96d638c9899cc0238389d5213c08 /Python/ast.c
parent9790a2706573359e02fcfc5f18f9907467f4ec49 (diff)
downloadcpython-b8ae3d01389f1b079303516aca24f61005c89ee1.zip
cpython-b8ae3d01389f1b079303516aca24f61005c89ee1.tar.gz
cpython-b8ae3d01389f1b079303516aca24f61005c89ee1.tar.bz2
Actually raise an exception before calling ast_error_finish.
Triggers an assertion otherwise.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index eb4c68b..be58f53 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -274,6 +274,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
return Interactive(stmts, arena);
}
default:
+ PyErr_Format(PyExc_SystemError,
+ "invalid node %d for PyAST_FromNode", TYPE(n));
goto error;
}
error: