Commit 569f3640 authored by Victor Stinner's avatar Victor Stinner

Issue #18408: Fix PyInit__curses_panel(), handle import_curses() failure

Don't call PyErr_NewException() if an exception is set, or type_call() would
fail with an assertion error.
parent 8e478327
......@@ -513,6 +513,8 @@ PyInit__curses_panel(void)
goto fail;
import_curses();
if (PyErr_Occurred())
goto fail;
/* For exception _curses_panel.error */
_curses_panelstate(m)->PyCursesError = PyErr_NewException("_curses_panel.error", NULL, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment