From 8805b83654faf3d02d97c6d42ace9cb93d43e19c Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Fri, 20 Sep 2013 01:16:36 +0300 Subject: [PATCH] Add safety guard for pylint. --- syntax_checkers/python/pylint.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/python/pylint.vim b/syntax_checkers/python/pylint.vim index 477d9372..321bc1f3 100644 --- a/syntax_checkers/python/pylint.vim +++ b/syntax_checkers/python/pylint.vim @@ -49,8 +49,12 @@ function! SyntaxCheckers_python_pylint_GetLocList() endfunction function s:PylintNew() - let pylint_version = filter(split(system('pylint --version'), '\m, \|\n'), 'v:val =~# "^pylint"')[0] - return syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(pylint_version), [1]) + try + let pylint_version = filter(split(system('pylint --version'), '\m, \|\n'), 'v:val =~# "^pylint"')[0] + return syntastic#util#versionIsAtLeast(syntastic#util#parseVersion(pylint_version), [1]) + catch /E684/ + return 0 + endtry endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({