diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-18 00:31:21 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-18 00:31:21 (GMT) |
commit | 569f364017442cc46e15e55027984ee890e2f8e2 (patch) | |
tree | 6ad30cb76ffec8f9d4470e7e02f48a06d0bce24d /Modules | |
parent | 8e4783273709df286fb6a83506ead4df8483a695 (diff) | |
download | cpython-569f364017442cc46e15e55027984ee890e2f8e2.zip cpython-569f364017442cc46e15e55027984ee890e2f8e2.tar.gz cpython-569f364017442cc46e15e55027984ee890e2f8e2.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_curses_panel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c index 3e9fffd..87b9c05 100644 --- a/Modules/_curses_panel.c +++ b/Modules/_curses_panel.c @@ -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); |