(original) (raw)

changeset: 84707:ddff866d820d user: Victor Stinner victor.stinner@gmail.com date: Thu Jul 18 02:31:21 2013 +0200 files: Modules/_curses_panel.c description: 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. diff -r 5bd9db528aed -r ddff866d820d Modules/_curses_panel.c --- a/Modules/_curses_panel.c Thu Jul 18 01:49:30 2013 +0200 +++ b/Modules/_curses_panel.c Thu Jul 18 02:31:21 2013 +0200 @@ -513,6 +513,8 @@ 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); /victor.stinner@gmail.com