diff src/if_py_both.h @ 4984:5b2c8f3b3906 v7.3.1237

updated for version 7.3.1237 Problem: Python: non-import errors not handled correctly. Solution: Let non-ImportError exceptions pass the finder. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Sun, 23 Jun 2013 16:40:39 +0200
parents 39980afcf54a
children e130cc3d17af
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -1199,6 +1199,14 @@ FinderFindModule(PyObject *self, PyObjec
 
     if (!module)
     {
+	if (PyErr_Occurred())
+	{
+	    if (PyErr_ExceptionMatches(PyExc_ImportError))
+		PyErr_Clear();
+	    else
+		return NULL;
+	}
+
 	Py_INCREF(Py_None);
 	return Py_None;
     }