From 705f561bdb3cbb8ad85e0d4046bf95b14a9e7180 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 10 Aug 2018 19:32:34 +0200 Subject: [PATCH] Sometimes when terminating, the subprocess module is already gone and equals None. --- jedi/evaluate/compiled/subprocess/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/evaluate/compiled/subprocess/__init__.py b/jedi/evaluate/compiled/subprocess/__init__.py index 420e048f..430d25c4 100644 --- a/jedi/evaluate/compiled/subprocess/__init__.py +++ b/jedi/evaluate/compiled/subprocess/__init__.py @@ -203,7 +203,7 @@ class CompiledSubprocess(object): def _kill(self): self.is_crashed = True - if subprocess.signal is None: + if getattr(subprocess, 'signal', None) is None: # If the Python process is terminating, sometimes it will remove # the signal module before a lot of other things, so check for it # and don't do anything, because the process is killed anyways.