Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26726fe commit 36b8f94Copy full SHA for 36b8f94
1 file changed
Python/pythonrun.c
@@ -530,7 +530,7 @@ PyErr_Print()
530
PyErr_Fetch(&exception, &v, &tb);
531
if (exception == NULL)
532
return;
533
- if (exception == PyExc_SystemExit) {
+ if (PyErr_GivenExceptionMatches(exception, PyExc_SystemExit)) {
534
err = Py_FlushLine();
535
fflush(stdout);
536
if (v == NULL || v == Py_None)
@@ -555,7 +555,9 @@ PyErr_Print()
555
556
if (err == 0)
557
err = PyTraceBack_Print(tb, f);
558
- if (err == 0 && exception == PyExc_SyntaxError) {
+ if (err == 0 &&
559
+ PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError))
560
+ {
561
PyObject *message;
562
char *filename, *text;
563
int lineno, offset;
0 commit comments