Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove redundant assert
  • Loading branch information
iritkatriel committed Mar 15, 2023
commit 4d2a362c42c0a2581176acca9070d61ca53f4778
3 changes: 1 addition & 2 deletions Python/pythonrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,11 @@ _Py_HandleSystemExit(int *exitcode_p)
int exitcode = 0;

PyObject *exc = PyErr_GetRaisedException();
assert(exc != Py_None);
if (exc == NULL) {
goto done;
}

assert(PyExceptionInstance_Check(exc));

/* The error code should be in the `code' attribute. */
PyObject *code = PyObject_GetAttr(exc, &_Py_ID(code));
if (code) {
Expand Down