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.
This commit is contained in:
parent
8e47832737
commit
569f364017
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue