Sometimes when terminating, the subprocess module is already gone and equals None.

This commit is contained in:
Dave Halter
2018-08-10 19:32:34 +02:00
parent 84b89f4689
commit 705f561bdb

View File

@@ -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.