bisect-kit: fix psutil api usage
psutil.Process.get_children() has been deprecated since 2.0.0 and
removed since 3.0.0. Use children() instead.
BUG=chromium:776314
TEST=unittest pass with psutil 3+
Change-Id: Ia3792897b5f892ee1a35887f6ffe91ca3e9ef110
Reviewed-on: https://chromium-review.googlesource.com/792890
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Owen Lin <owenlin@chromium.org>
diff --git a/bisect_kit/util.py b/bisect_kit/util.py
index 44c3cec..675f4cf 100644
--- a/bisect_kit/util.py
+++ b/bisect_kit/util.py
@@ -113,7 +113,7 @@
# Need to ignore failures because sometimes they are expected.
# For example, the owner of child process is different to current and
# unable to be killed by current process. 'cros_sdk' is one of such case.
- for proc in psutil.Process(self.p.pid).get_children(recursive=True):
+ for proc in psutil.Process(self.p.pid).children(recursive=True):
try:
proc.terminate()
except psutil._error.AccessDenied: # pylint: disable=protected-access