Commit b8ae3d01 authored by Georg Brandl's avatar Georg Brandl

Actually raise an exception before calling ast_error_finish.

Triggers an assertion otherwise.
parent 9790a270
...@@ -274,6 +274,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename, ...@@ -274,6 +274,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
return Interactive(stmts, arena); return Interactive(stmts, arena);
} }
default: default:
PyErr_Format(PyExc_SystemError,
"invalid node %d for PyAST_FromNode", TYPE(n));
goto error; goto error;
} }
error: error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment