summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-23 16:40:39 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-23 16:40:39 +0200
commit7e85d3d432e799fc56126f6e3867b52539978343 (patch)
tree7e94ca76eea48b20be0f1ec49128678880d601c8 /src/if_py_both.h
parentdee2e315d786cbe9d5bba2d388fb72d96ad1a846 (diff)
downloadvim-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.h8
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;
}