From 3b96c3ca524e40fb84f1ae6e3d676c7c300cfa9a Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 5 Aug 2015 11:20:48 -0400 Subject: [PATCH] Fix psutil usage on el6 for job cancel psutil will fail to import on el6 due to not being able to access a pseudo terminal. This issues a SIGKILL to the proot process in order to force the stop --- awx/main/tasks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 39077078c1..b8449d33f7 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -23,6 +23,10 @@ import uuid from distutils.version import LooseVersion as Version import dateutil.parser import yaml +try: + import psutil +except: + psutil = None # Pexpect import pexpect