]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
EOF while parsing should raise EOFError, not SyntaxError.
authorGuido van Rossum <guido@python.org>
Tue, 24 Dec 1991 13:26:15 +0000 (13:26 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 24 Dec 1991 13:26:15 +0000 (13:26 +0000)
Python/errors.c

index d61af3bb24cf382ff2f3ca0af7599e61fbbce0cb..de70f22f9a982249947a0b07297a749930dd3f8e 100644 (file)
@@ -192,7 +192,7 @@ err_input(err)
                err_nomem();
                break;
        case E_EOF:
-               err_setstr(SyntaxError, "unexpected EOF");
+               err_setstr(EOFError, "unexpected EOF while parsing");
                break;
        default:
                err_setstr(SystemError, "unknown parsing error");