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:
@@ -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([])')
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
let s:plugin_path = expand('<sfile>:p:h', 1)
|
||||
|
||||
if exists(":Pep8")
|
||||
if exists(":Pylint")
|
||||
finish " only load once
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user