1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Handle psutil errors when terminating tasks.

This commit is contained in:
Chris Church 2016-12-14 16:37:44 -05:00
parent e8f01c9029
commit 9c444e084e

View File

@ -618,7 +618,7 @@ class BaseTask(Task):
for child_proc in child_procs:
os.kill(child_proc.pid, signal.SIGKILL)
os.kill(main_proc.pid, signal.SIGKILL)
except TypeError:
except (TypeError, psutil.Error):
os.kill(job.pid, signal.SIGKILL)
else:
os.kill(job.pid, signal.SIGTERM)