1
0
mirror of https://github.com/gryf/pylint-vim.git synced 2025-12-19 04:20:23 +01:00

Be silent in case of lack of pylint

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

View File

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