forked from VimPlug/jedi
Add a way to generalize Popen
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE
|
||||
from collections import namedtuple
|
||||
# When dropping Python 2.7 support we should consider switching to
|
||||
# `shutil.which`.
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
from jedi._compatibility import GeneralizedPopen
|
||||
from jedi.cache import memoize_method
|
||||
from jedi.evaluate.compiled.subprocess import get_subprocess, \
|
||||
EvaluatorSameProcess, EvaluatorSubprocess
|
||||
@@ -54,7 +55,7 @@ class _Environment(_BaseEnvironment):
|
||||
|
||||
def _get_version(self):
|
||||
try:
|
||||
process = Popen([self.executable, '--version'], stdout=PIPE, stderr=PIPE)
|
||||
process = GeneralizedPopen([self.executable, '--version'], stdout=PIPE, stderr=PIPE)
|
||||
stdout, stderr = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
|
||||
Reference in New Issue
Block a user