provider/python: define Prog and Error functions always

`provider#pythonX#Error` and `provider#pythonX#Prog` are currently meant
for debugging only (the error message is not being used), and should
therefore be defined always, especially in case of errors.

Ref: https://github.com/neovim/neovim/pull/2549#issuecomment-98607580
This commit is contained in:
Daniel Hahler
2015-05-04 22:14:54 +02:00
committed by Florian Walch
parent 3b0ec6599c
commit 866e587b88
2 changed files with 10 additions and 8 deletions

View File

@@ -10,10 +10,6 @@ endif
let g:loaded_python_provider = 1
let [s:prog, s:err] = provider#pythonx#Detect(2)
if s:prog == ''
" Detection failed
finish
endif
function! provider#python#Prog()
return s:prog
@@ -23,6 +19,11 @@ function! provider#python#Error()
return s:err
endfunction
if s:prog == ''
" Detection failed
finish
endif
let s:plugin_path = expand('<sfile>:p:h').'/script_host.py'
" The Python provider plugin will run in a separate instance of the Python