diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-06-14 17:07:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-14 17:07:51 (GMT) |
commit | 0d0a9eaa822658679cc2b65f125ab74bfd4aedfe (patch) | |
tree | 84dbd7265d6288d3ff6d21db99d00ca13ae8cd9f /Parser | |
parent | 7f021952b2debb51306f70ec96a94ecc7fbffc19 (diff) | |
download | cpython-0d0a9eaa822658679cc2b65f125ab74bfd4aedfe.zip cpython-0d0a9eaa822658679cc2b65f125ab74bfd4aedfe.tar.gz cpython-0d0a9eaa822658679cc2b65f125ab74bfd4aedfe.tar.bz2 |
[3.9] bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712). (GH-26723)
(cherry picked from commit 507ed6fa1d6661e0f8e6d3282764aa9625a99594)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/pegen/pegen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c index 111009a..bf53214 100644 --- a/Parser/pegen/pegen.c +++ b/Parser/pegen/pegen.c @@ -269,6 +269,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; |