From d75e1395c9ff3ffcb0663122140be393c7ae6b60 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 19 Jun 2015 12:00:06 -0300 Subject: [feat] support new psutil API API to get the children has changed on latest psutil, this takes care of it. --- src/leap/bitmask/app.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/app.py') diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index 543fa03a..aa4e304b 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -73,7 +73,15 @@ def kill_the_children(): parent = psutil.Process(me) print "Killing all the children processes..." - for child in parent.get_children(recursive=True): + children = None + try: + # for psutil 0.2.x + children = parent.get_children(recursive=True) + except: + # for psutil 0.3.x + children = parent.children(recursive=True) + + for child in children: try: child.terminate() except Exception as exc: -- cgit v1.2.3