diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-07-06 13:02:30 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-07-06 13:02:30 +0200 |
commit | 91aeaf4cce8d534a1bdd6a2ceeba759e83952ab0 (patch) | |
tree | 403588ea57b3c1263790c7cf14c77a24d0bdeea1 /src/if_py_both.h | |
parent | bc488a76ccd7473d87f935b7db75bb6f3b55ac36 (diff) |
updated for version 7.3.1312v7.3.1312
Problem: Not giving correct error messages for SystemExit().
Solution: Move E858 into an else. (Ken Takata)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 7253fc72c4..a9fe505a8b 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -5103,14 +5103,17 @@ run_eval(const char *cmd, typval_T *rettv 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 { |