Merge "Adjust psutil usage for psutil > 2"

This commit is contained in:
Jenkins 2017-01-26 09:19:43 +00:00 committed by Gerrit Code Review
commit 4ae6790d82

View File

@ -110,7 +110,10 @@ class TestNeutronServer(base.BaseTestCase):
def safe_ppid(proc):
try:
return proc.ppid
if psutil.version_info[0] == 1:
return proc.ppid
else:
return proc.ppid()
except psutil.NoSuchProcess:
return None