summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-07-15 05:00:03 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-07-15 05:00:03 (GMT)
commite09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5 (patch)
treeaa635fb5095afc603285433e46875096b2911619 /Python
parent2b8792137bf5e02ee4263822f818b31b68830f4b (diff)
downloadcpython-e09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5.zip
cpython-e09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5.tar.gz
cpython-e09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5.tar.bz2
make too many nested blocks be a SyntaxError instead of a SystemError (closes #27514)
Patch by Ammar Askar.
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index ce510aa..93f47e0 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;
}