From cfadac7f22e36ac4d809e87a6892f29b29dade80 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 8 Aug 2017 17:22:21 +0200 Subject: [PATCH] jedi#debug_info: try/catch failures from s:init_python() This is relevant for when using `:JediDebuginfo` in a broken setup, where the call to `jedi#init_python()` in the autoload file throws an error already (but `jedi#debug_info` is defined/loaded before already). --- autoload/jedi.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 0f60cfa..8f81175 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -186,7 +186,12 @@ endfunction function! jedi#debug_info() abort if s:python_version ==# 'null' - call s:init_python() + try + call s:init_python() + catch + echohl WarningMsg | echom v:exception | echohl None + return + endtry endif if &verbose if &filetype !=# 'python'