summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2013-04-10 09:27:18 -0700
committerGiampaolo Rodola' <g.rodola@gmail.com>2013-04-10 09:27:18 -0700
commit87c4c66992d22b7135148d6c7eb51703b4576419 (patch)
tree55b983caa6785bb5904f0833055ba26f666a7472
parentb108b242835d379a79d0b5f7634ea4e036dbd753 (diff)
downloadpsutil-87c4c66992d22b7135148d6c7eb51703b4576419.tar.gz
fix children duplicates test
-rw-r--r--test/test_psutil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_psutil.py b/test/test_psutil.py
index f86f18c9..2a36af71 100644
--- a/test/test_psutil.py
+++ b/test/test_psutil.py
@@ -1499,7 +1499,7 @@ class TestCase(unittest.TestCase):
except psutil.Error:
pass
# this is the one, now let's make sure there are no duplicates
- pid = max(sorted(table, key=lambda x: table[x]))
+ pid = sorted(table.items(), key=lambda x: x[1])[-1][0]
p = psutil.Process(pid)
try:
c = p.get_children(recursive=True)