diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-14 17:07:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-14 17:07:52 (GMT) |
commit | 133cddf76e8265536c584872351c191e3afd66a2 (patch) | |
tree | c6f1856f20265cdd980aff8723e88419bc879a9e /Parser/pegen.c | |
parent | fc310cb862ce0411bb5daed37f7f31b75647495b (diff) | |
download | cpython-133cddf76e8265536c584872351c191e3afd66a2.zip cpython-133cddf76e8265536c584872351c191e3afd66a2.tar.gz cpython-133cddf76e8265536c584872351c191e3afd66a2.tar.bz2 |
bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712)
(cherry picked from commit 507ed6fa1d6661e0f8e6d3282764aa9625a99594)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r-- | Parser/pegen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c index 1941244..615047c 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -283,6 +283,7 @@ static void raise_tokenizer_init_error(PyObject *filename) { if (!(PyErr_ExceptionMatches(PyExc_LookupError) + || PyErr_ExceptionMatches(PyExc_SyntaxError) || PyErr_ExceptionMatches(PyExc_ValueError) || PyErr_ExceptionMatches(PyExc_UnicodeDecodeError))) { return; |