Actually raise an exception before calling ast_error_finish.

Triggers an assertion otherwise.
This commit is contained in:
Georg Brandl 2007-05-02 20:02:29 +00:00
parent 9790a27065
commit b8ae3d0138

View file

@ -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: