summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2020-04-12 18:21:00 (GMT)
committerGitHub <noreply@github.com>2020-04-12 18:21:00 (GMT)
commit41d5b94af44e34ac05d4cd57460ed104ccf96628 (patch)
tree564847a328b623cc02268a93fda371e0bea797b3 /Python/pythonrun.c
parent402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527 (diff)
downloadcpython-41d5b94af44e34ac05d4cd57460ed104ccf96628.zip
cpython-41d5b94af44e34ac05d4cd57460ed104ccf96628.tar.gz
cpython-41d5b94af44e34ac05d4cd57460ed104ccf96628.tar.bz2
bpo-40246: Report a better error message for invalid string prefixes (GH-19476)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 95571a8..eb9159f 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1574,6 +1574,9 @@ err_input(perrdetail *err)
case E_BADSINGLE:
msg = "multiple statements found while compiling a single statement";
break;
+ case E_BADPREFIX:
+ msg = "invalid string prefix";
+ break;
default:
fprintf(stderr, "error=%d\n", err->error);
msg = "unknown parsing error";