Mercurial > vim
changeset 5139:80bab8b1a30d v7.3.1312
updated for version 7.3.1312
Problem: Not giving correct error messages for SystemExit().
Solution: Move E858 into an else. (Ken Takata)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 06 Jul 2013 13:02:30 +0200 |
parents | 0d4e0cde36e1 |
children | 72bd085c607b |
files | src/if_py_both.h src/version.c |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -5103,14 +5103,17 @@ run_eval(const char *cmd, typval_T *rett run_ret = PyRun_String((char *)cmd, Py_eval_input, globals, globals); if (run_ret == NULL) { - if (PyErr_ExceptionMatches(PyExc_SystemExit)) + if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_SystemExit)) { EMSG2(_(e_py_systemexit), "python"); PyErr_Clear(); } - if (PyErr_Occurred() && !msg_silent) - PyErr_PrintEx(0); - EMSG(_("E858: Eval did not return a valid python object")); + else + { + if (PyErr_Occurred() && !msg_silent) + PyErr_PrintEx(0); + EMSG(_("E858: Eval did not return a valid python object")); + } } else {