aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/python.vim
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2015-05-05 11:22:53 +0200
committerFlorian Walch <florian@fwalch.com>2015-06-09 10:29:46 +0300
commit2111f28fc5b716bafd7524567398c4ce020e1cc8 (patch)
tree8d6a71ecf090376c4b86640f16ae57b055dc4855 /runtime/autoload/provider/python.vim
parent866e587b88715e3c10a706687f52a54516721662 (diff)
downloadrneovim-2111f28fc5b716bafd7524567398c4ce020e1cc8.tar.gz
rneovim-2111f28fc5b716bafd7524567398c4ce020e1cc8.tar.bz2
rneovim-2111f28fc5b716bafd7524567398c4ce020e1cc8.zip
provider/python: Call: fix usage of 'finish' in function
Do not call it again in case of an exception in `remote#host#Require` (ref: https://github.com/neovim/neovim/pull/2549#issuecomment-102674350).
Diffstat (limited to 'runtime/autoload/provider/python.vim')
-rw-r--r--runtime/autoload/provider/python.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/autoload/provider/python.vim b/runtime/autoload/provider/python.vim
index 5ce636c324..d4a509864f 100644
--- a/runtime/autoload/provider/python.vim
+++ b/runtime/autoload/provider/python.vim
@@ -32,6 +32,9 @@ call remote#host#RegisterClone('legacy-python-provider', 'python')
call remote#host#RegisterPlugin('legacy-python-provider', s:plugin_path, [])
function! provider#python#Call(method, args)
+ if s:err != ''
+ return
+ endif
if !exists('s:host')
let s:rpcrequest = function('rpcrequest')
@@ -39,7 +42,10 @@ function! provider#python#Call(method, args)
try
let s:host = remote#host#Require('legacy-python-provider')
catch
+ let s:err = v:exception
+ echohl WarningMsg
echomsg v:exception
+ echohl None
finish
endtry
endif