diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2023-05-30 21:52:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 21:52:52 (GMT) |
commit | 70f315c2d6de87b0514ce16cc00a91a5b60a6098 (patch) | |
tree | 0a3e2b256a513f7d0767ee835b1366b7513b7590 /Python/Python-tokenize.c | |
parent | 9216e69a87d16d871625721ed5a8aa302511f367 (diff) | |
download | cpython-70f315c2d6de87b0514ce16cc00a91a5b60a6098.zip cpython-70f315c2d6de87b0514ce16cc00a91a5b60a6098.tar.gz cpython-70f315c2d6de87b0514ce16cc00a91a5b60a6098.tar.bz2 |
gh-105042: Disable unmatched parens syntax error in python tokenize (#105061)
Diffstat (limited to 'Python/Python-tokenize.c')
-rw-r--r-- | Python/Python-tokenize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 8bf8f54..a7933b2 100644 --- a/Python/Python-tokenize.c +++ b/Python/Python-tokenize.c @@ -84,7 +84,7 @@ _tokenizer_error(struct tok_state *tok) msg = "invalid token"; break; case E_EOF: - if (tok->level) { + if (tok->level > 0) { PyErr_Format(PyExc_SyntaxError, "parenthesis '%c' was never closed", tok->parenstack[tok->level-1]); |