mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
remove py2 compatability from awx.main.expect.run
this module is no longer run on isolated nodes (they use runner now)
This commit is contained in:
@@ -14,10 +14,7 @@ import signal
|
|||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
try:
|
from io import StringIO
|
||||||
from io import StringIO
|
|
||||||
except ImportError:
|
|
||||||
from StringIO import StringIO
|
|
||||||
|
|
||||||
import pexpect
|
import pexpect
|
||||||
import psutil
|
import psutil
|
||||||
@@ -231,10 +228,7 @@ def handle_termination(pid, args, proot_cmd, is_cancel=True):
|
|||||||
instance's cancel_flag.
|
instance's cancel_flag.
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
if sys.version_info > (3, 0):
|
used_proot = proot_cmd.encode('utf-8') in args
|
||||||
used_proot = proot_cmd.encode('utf-8') in args
|
|
||||||
else:
|
|
||||||
used_proot = proot_cmd in ' '.join(args)
|
|
||||||
if used_proot:
|
if used_proot:
|
||||||
if not psutil:
|
if not psutil:
|
||||||
os.kill(pid, signal.SIGKILL)
|
os.kill(pid, signal.SIGKILL)
|
||||||
|
|||||||
Reference in New Issue
Block a user