commit | e09ed5419b84040a6f5d74ec9a3ae4fd9b4bc0e5 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Thu Jul 14 22:00:03 2016 -0700 |
committer | Benjamin Peterson <benjamin@python.org> | Thu Jul 14 22:00:03 2016 -0700 |
tree | aa635fb5095afc603285433e46875096b2911619 | |
parent | 2b8792137bf5e02ee4263822f818b31b68830f4b [diff] [blame] |
make too many nested blocks be a SyntaxError instead of a SystemError (closes #27514) Patch by Ammar Askar.
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 @@ { 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; }