From ca3263c50c3b3a3719d2ec3ee7b30b8c669dcb19 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Sun, 11 Dec 2016 00:18:36 +0000 Subject: Issue #25677: Correct syntax error caret for indented blocks. Based on patch by Michael Layzell. --- Python/errors.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index ebfb3fdf24..b820722dfa 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -1094,11 +1094,8 @@ err_programtext(FILE *fp, int lineno) } fclose(fp); if (i == lineno) { - char *p = linebuf; PyObject *res; - while (*p == ' ' || *p == '\t' || *p == '\014') - p++; - res = PyUnicode_FromString(p); + res = PyUnicode_FromString(linebuf); if (res == NULL) PyErr_Clear(); return res; -- cgit v1.2.1