1
0
forked from VimPlug/jedi

Ignore some errors that are happening when the Python process ends and its subprocesses are cleaned up

This commit is contained in:
Dave Halter
2018-08-21 01:28:13 +02:00
parent 5081b06016
commit 6ddc242746
@@ -203,13 +203,14 @@ class CompiledSubprocess(object):
def _kill(self): def _kill(self):
self.is_crashed = True self.is_crashed = True
if getattr(subprocess, 'signal', None) is None: try:
# If the Python process is terminating, sometimes it will remove self._process.kill()
# the signal module before a lot of other things, so check for it self._process.wait()
# and don't do anything, because the process is killed anyways. except (AttributeError, TypeError):
return # If the Python process is terminating, it will remove some modules
self._process.kill() # earlier than others and in general it's unclear how to deal with
self._process.wait() # that so we just ignore the exceptions here.
pass
def __del__(self): def __del__(self):
if not self.is_crashed: if not self.is_crashed: