1
0
forked from VimPlug/jedi

Make the subprocesses work and return the right sys paths for the different versions

This commit is contained in:
Dave Halter
2017-11-15 08:58:13 +01:00
parent 96149d2e6a
commit 4136dcaf08
6 changed files with 53 additions and 41 deletions
-22
View File
@@ -289,25 +289,3 @@ def utf8_repr(func):
return func
else:
return wrapper
try:
from subprocess import check_output
except ImportError:
def check_output(*popenargs, **kwargs):
"""
Taken from Python 2.6.
"""
from subprocess import Popen, PIPE, CalledProcessError
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = Popen(stdout=PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise CalledProcessError(retcode, cmd, output=output)
return output