diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-23 16:40:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-23 16:40:39 +0200 |
commit | 7e85d3d432e799fc56126f6e3867b52539978343 (patch) | |
tree | 7e94ca76eea48b20be0f1ec49128678880d601c8 /src/if_py_both.h | |
parent | dee2e315d786cbe9d5bba2d388fb72d96ad1a846 (diff) | |
download | vim-git-7e85d3d432e799fc56126f6e3867b52539978343.tar.gz |
updated for version 7.3.1237v7.3.1237
Problem: Python: non-import errors not handled correctly.
Solution: Let non-ImportError exceptions pass the finder. (ZyX)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 8f60550f9..4f977c38c 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -1199,6 +1199,14 @@ FinderFindModule(PyObject *self, PyObject *args) if (!module) { + if (PyErr_Occurred()) + { + if (PyErr_ExceptionMatches(PyExc_ImportError)) + PyErr_Clear(); + else + return NULL; + } + Py_INCREF(Py_None); return Py_None; } |