forked from VimPlug/jedi-vim
jedi#setup_py_version: check if init script is readable
Ref: https://github.com/davidhalter/jedi-vim/issues/726.
This commit is contained in:
@@ -153,8 +153,12 @@ function! jedi#setup_py_version(py_version) abort
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
execute 'command! -nargs=1 PythonJedi '.cmd_exec.' <args>'
|
execute 'command! -nargs=1 PythonJedi '.cmd_exec.' <args>'
|
||||||
|
let init_script = s:script_path.'/initialize.py'
|
||||||
|
if !filereadable(init_script)
|
||||||
|
throw printf('jedi#setup_py_version: init-script is not readable (%s).', init_script)
|
||||||
|
endif
|
||||||
try
|
try
|
||||||
execute cmd_init.' '.s:script_path.'/initialize.py'
|
execute cmd_init.' '.init_script
|
||||||
catch
|
catch
|
||||||
throw 'jedi#setup_py_version: '.v:exception
|
throw 'jedi#setup_py_version: '.v:exception
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
Reference in New Issue
Block a user