summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-07-14 22:00:03 -0700
committerBenjamin Peterson <benjamin@python.org>2016-07-14 22:00:03 -0700
commit39b667e2459725bc81680dac41d1bb3992c09d63 (patch)
treeefe9d42432be4cc7c99d1a7f05984a0bc928c2d9 /Python/compile.c
parentc0c8da515a521d4b61d089ceb873ee17e80ac985 (diff)
downloadcpython-39b667e2459725bc81680dac41d1bb3992c09d63.tar.gz
make too many nested blocks be a SyntaxError instead of a SystemError (closes #27514)
Patch by Ammar Askar.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
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;
}