1
0
mirror of https://github.com/gryf/pylint-vim.git synced 2025-12-18 20:10:21 +01:00

Be silent in case of lack of pylint

This commit is contained in:
2017-03-13 20:54:01 +01:00
parent 484e2924e5
commit 2565ed7c96
2 changed files with 6 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ try:
from pylint import lint
from pylint.reporters.text import TextReporter
except ImportError:
raise AssertionError('Error: pylint_fm.vim requires module pylint')
pylint = None
import vim
@@ -25,6 +25,10 @@ class VImPylint(object):
def run(self):
"""execute pylint and fill the quickfix"""
if not pylint:
vim.command("echo 'Error: pylint_fm.vim requires module pylint'")
return
# clear QF window
vim.command('call setqflist([])')

View File

@@ -46,7 +46,7 @@
let s:plugin_path = expand('<sfile>:p:h', 1)
if exists(":Pep8")
if exists(":Pylint")
finish " only load once
endif