Fix tests on python3

This commit is contained in:
ZyX 2013-05-11 13:13:31 +04:00
parent 5c2c47aa2f
commit ea3c939320

View File

@ -42,13 +42,13 @@ else:
if hasattr(vim, 'vars'): if hasattr(vim, 'vars'):
def vim_getvar(varname): def vim_getvar(varname):
return vim.vars[bytes(varname)] return vim.vars[str(varname)]
elif hasattr(vim, 'bindeval'): elif hasattr(vim, 'bindeval'):
_vim_globals = vim.bindeval('g:') _vim_globals = vim.bindeval('g:')
def vim_getvar(varname): # NOQA def vim_getvar(varname): # NOQA
try: try:
return _vim_globals[bytes(varname)] return _vim_globals[str(varname)]
except (KeyError, IndexError): except (KeyError, IndexError):
raise KeyError(varname) raise KeyError(varname)
else: else: