health/python: slightly improve output

This commit is contained in:
Marco Hinz 2018-11-18 21:38:34 +01:00
parent 443cd04d5b
commit 57fef7c74d
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -410,16 +410,16 @@ function! s:check_python(version) abort
call health#report_warn('Python 3.3+ is recommended.') call health#report_warn('Python 3.3+ is recommended.')
endif endif
call health#report_info('Python'.a:version.' version: ' . pyversion) call health#report_info('Python version: ' . pyversion)
if s:is_bad_response(status) if s:is_bad_response(status)
call health#report_info(printf('%s-neovim version: %s (%s)', pyname, current, status)) call health#report_info(printf('pynvim version: %s (%s)', current, status))
else else
call health#report_info(printf('%s-neovim version: %s', pyname, current)) call health#report_info(printf('pynvim version: %s', current))
endif endif
if s:is_bad_response(current) if s:is_bad_response(current)
call health#report_error( call health#report_error(
\ "Neovim Python client is not installed.\nError: ".current, \ "pynvim is not installed.\nError: ".current,
\ ['Run in shell: pip' . a:version . ' install pynvim']) \ ['Run in shell: pip' . a:version . ' install pynvim'])
endif endif
@ -427,11 +427,9 @@ function! s:check_python(version) abort
call health#report_warn('Could not contact PyPI to get latest version.') call health#report_warn('Could not contact PyPI to get latest version.')
call health#report_error('HTTP request failed: '.latest) call health#report_error('HTTP request failed: '.latest)
elseif s:is_bad_response(status) elseif s:is_bad_response(status)
call health#report_warn(printf('Latest %s-neovim is NOT installed: %s', call health#report_warn(printf('Latest pynvim is NOT installed: %s', latest))
\ pyname, latest))
elseif !s:is_bad_response(current) elseif !s:is_bad_response(current)
call health#report_ok(printf('Latest %s-neovim is installed: %s', call health#report_ok(printf('Latest pynvim is installed.'))
\ pyname, latest))
endif endif
endif endif