Sync requirements with OpenStack global requirements

Change-Id: Ic9046ea38059b6aa55bb683b07b28e3ff25dae6d
This commit is contained in:
Ilya Shakhat
2017-03-29 16:45:01 +04:00
parent ac03a19b41
commit 33d8ec8e4f
4 changed files with 28 additions and 30 deletions

View File

@@ -41,13 +41,11 @@ LOG = logging.getLogger(__name__)
def get_pids():
# needs to be compatible with psutil >= 1.1.1 since it's a global req.
PSUTIL2 = psutil.version_info >= (2, 0)
result = set([])
for pid in psutil.get_pid_list():
for pid in psutil.pids():
try:
p = psutil.Process(pid)
name = p.name() if PSUTIL2 else p.name
name = p.name()
if name == 'uwsgi':
LOG.debug('Found uwsgi process, pid: %s', pid)
result.add(pid)