From e09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 14 Jul 2016 22:00:03 -0700 Subject: make too many nested blocks be a SyntaxError instead of a SystemError (closes #27514) Patch by Ammar Askar. --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index ce510aa731..93f47e0220 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3980,7 +3980,7 @@ compiler_push_fblock(struct compiler *c, enum fblocktype t, basicblock *b) { struct fblockinfo *f; if (c->u->u_nfblocks >= CO_MAXBLOCKS) { - PyErr_SetString(PyExc_SystemError, + PyErr_SetString(PyExc_SyntaxError, "too many statically nested blocks"); return 0; } -- cgit v1.2.1