Skip to content

Commit 4d2a362

Browse files
committed
remove redundant assert
1 parent 86af53f commit 4d2a362

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Python/pythonrun.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,11 @@ _Py_HandleSystemExit(int *exitcode_p)
703703
int exitcode = 0;
704704

705705
PyObject *exc = PyErr_GetRaisedException();
706-
assert(exc != Py_None);
707706
if (exc == NULL) {
708707
goto done;
709708
}
710-
711709
assert(PyExceptionInstance_Check(exc));
710+
712711
/* The error code should be in the `code' attribute. */
713712
PyObject *code = PyObject_GetAttr(exc, &_Py_ID(code));
714713
if (code) {

0 commit comments

Comments
 (0)