Fix some errors in troubleshooting code

This commit is contained in:
ZyX 2014-09-04 08:27:36 +04:00
parent eda93c87fd
commit a919b453ee
1 changed files with 4 additions and 2 deletions

View File

@ -99,6 +99,7 @@ finally
echohl None
call s:rcmd("def powerline_troubleshoot():")
call s:rcmd(" import sys")
call s:rcmd(" import vim")
call s:rcmd(" if sys.version_info < (2, 6):")
call s:rcmd(" print('Too old python version: ' + sys.version + ' (first supported is 2.6)')")
call s:rcmd(" elif sys.version_info[0] == 3 and sys.version_info[1] < 2:")
@ -123,10 +124,11 @@ finally
call s:rcmd(" print('neither it is installed system-wide')")
call s:rcmd(" real_powerline_dir = os.path.realpath(powerline_dir)")
call s:rcmd(" real_this_dir = os.path.realpath(this_dir)")
call s:rcmd(" if powerline_appended_path is not None and real_this_dir != powerline_appended_path:")
call s:rcmd(" this_dir_par = os.path.dirname(real_this_dir)")
call s:rcmd(" if powerline_appended_path is not None and this_dir_par != powerline_appended_path:")
call s:rcmd(" print('Check your installation: this script is symlinked somewhere')")
call s:rcmd(" print('where powerline is not present: {0!r} != {1!r}.'.format(")
call s:rcmd(" real_this_dir, sys.path[-1]))")
call s:rcmd(" real_this_dir, powerline_appended_path))")
call s:rcmd(" elif real_powerline_dir != real_this_dir:")
call s:rcmd(" print('It appears that you have two powerline versions installed:')")
call s:rcmd(" print('one in ' + real_powerline_dir + ', other in ' + real_this_dir + '.')")