Posting an error message when jedi import fails

This commit is contained in:
Strahinja Val Markovic 2013-03-24 14:52:11 -07:00
parent 4d95e32a1e
commit 8f2715c1a4

View File

@ -30,7 +30,12 @@ from os.path import join, abspath, dirname
# up after ourselves, because ycm.YouCompletMe.GetFiletypeCompleterForFiletype # up after ourselves, because ycm.YouCompletMe.GetFiletypeCompleterForFiletype
# removes sys.path[0] after importing completers.python.hook # removes sys.path[0] after importing completers.python.hook
sys.path.insert(0, join(abspath(dirname(__file__)), 'jedi')) sys.path.insert(0, join(abspath(dirname(__file__)), 'jedi'))
try:
from jedi import Script from jedi import Script
except ImportError, e:
vimsupport.PostVimMessage(
'Error importing jedi. Make sure the jedi submodule has been checked out. '
'In the YouCompleteMe folder, run "git submodule update --init --recursive"')
sys.path.pop(0) sys.path.pop(0)