diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-05-15 20:53:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 20:53:55 (GMT) |
commit | 8a3702f0c79e5a99fcef61e35724f4b9ea3453b8 (patch) | |
tree | 4f20790762402485cb474ba3590fd1c3ae4884fc /Python/compile.c | |
parent | 26baa747c2ebc2beeff769bb07b5fb5a51ad5f4b (diff) | |
download | cpython-8a3702f0c79e5a99fcef61e35724f4b9ea3453b8.zip cpython-8a3702f0c79e5a99fcef61e35724f4b9ea3453b8.tar.gz cpython-8a3702f0c79e5a99fcef61e35724f4b9ea3453b8.tar.bz2 |
gh-104482: Fix error handling bugs in ast.c (#104483)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index f8d0197..bf5e4a5 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -567,6 +567,7 @@ PyCodeObject * _PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags, int optimize, PyArena *arena) { + assert(!PyErr_Occurred()); struct compiler *c = new_compiler(mod, filename, pflags, optimize, arena); if (c == NULL) { return NULL; |