mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Actually raise an exception before calling ast_error_finish.
Triggers an assertion otherwise.
This commit is contained in:
parent
9790a27065
commit
b8ae3d0138
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue