Browse Source

fixed py3, subprocess error output also needs to be converted to str

pull/629/head
Augusto F. Hack 10 years ago
parent
commit
2d9d619a0d
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      autoload/vundle/installer.vim

+ 4
- 3
autoload/vundle/installer.vim View File

@ -84,6 +84,8 @@ def sync(cmd):
import msvcrt
devnull = msvcrt.get_osfhandle(os.devnull)
# py3 output is bytes, convert it before returning
try:
out = subprocess.check_output(
cmd,
@ -92,11 +94,10 @@ def sync(cmd):
stderr=subprocess.STDOUT,
)
except subprocess.CalledProcessError as error:
return (error.returncode, error.output)
return (error.returncode, to_str(error.output))
except Excpetion as error:
return (-1, error.message)
return (-1, to_str(error.message))
# py3 returns bytes
return (0, to_str(out))
def ui(iterable, cmds, shas, total, threads):


Loading…
Cancel
Save