summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/bitmask/app.py10
1 files changed, 9 insertions, 1 deletions
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: