forked from VimPlug/jedi-vim
Merge pull request #602 from blueyed/improve-jedi-load-error
Improve error msg when the jedi submodule fails to load
This commit is contained in:
@@ -89,8 +89,8 @@ def no_jedi_warning(error=None):
|
||||
|
||||
|
||||
def echo_highlight(msg):
|
||||
vim_command('echohl WarningMsg | echom "{0}" | echohl None'.format(
|
||||
msg.replace('"', '\\"')))
|
||||
vim_command('echohl WarningMsg | echom "jedi-vim: {0}" | echohl None'.format(
|
||||
str(msg).replace('"', '\\"')))
|
||||
|
||||
|
||||
try:
|
||||
@@ -102,7 +102,10 @@ else:
|
||||
try:
|
||||
version = jedi.__version__
|
||||
except Exception as e: # e.g. AttributeError
|
||||
echo_highlight("Could not load jedi python module: {0}".format(e))
|
||||
echo_highlight(
|
||||
"Error when loading the jedi python module ({0}). "
|
||||
"Please ensure that Jedi is installed correctly (see Installation "
|
||||
"in the README.".format(e))
|
||||
jedi = None
|
||||
else:
|
||||
if isinstance(version, str):
|
||||
|
||||
Reference in New Issue
Block a user