0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.3.1237

Problem:    Python: non-import errors not handled correctly.
Solution:   Let non-ImportError exceptions pass the finder. (ZyX)
This commit is contained in:
Bram Moolenaar
2013-06-23 16:40:39 +02:00
parent dee2e315d7
commit 7e85d3d432
4 changed files with 12 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -497,7 +497,7 @@ vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2
> import
import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',)
import failing_import:ImportError:('No module named failing_import',)
import failing:ImportError:('No module named failing',)
import failing:NotImplementedError:()
> Dictionary
>> DictionaryConstructor
vim.Dictionary("abcI"):ValueError:('expected sequence element of size 2, but got sequence of size 1',)

View File

@@ -486,7 +486,7 @@ vim.foreach_rtp(int, 2):(<class 'TypeError'>, TypeError('foreach_rtp() takes exa
> import
import xxx_no_such_module_xxx:(<class 'ImportError'>, ImportError('No module named xxx_no_such_module_xxx',))
import failing_import:(<class 'ImportError'>, ImportError('No module named failing_import',))
import failing:(<class 'ImportError'>, ImportError('No module named failing',))
import failing:(<class 'NotImplementedError'>, NotImplementedError())
> Dictionary
>> DictionaryConstructor
vim.Dictionary("abcI"):(<class 'ValueError'>, ValueError('expected sequence element of size 2, but got sequence of size 1',))

View File

@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1237,
/**/
1236,
/**/