pids: case insensitive string comparison for process names (#52564)

pull/53800/head
abyss 6 years ago committed by Abhijeet Kasurde
parent b8da83cfe0
commit e428441a1d

@ -53,7 +53,7 @@ except ImportError:
def get_pid(name):
return [p.info['pid'] for p in psutil.process_iter(attrs=['pid', 'name']) if name == p.info['name']]
return [p.info['pid'] for p in psutil.process_iter(attrs=['pid', 'name']) if p.info and p.info.get('name', None) and p.info['name'].lower() == name.lower()]
def main():

Loading…
Cancel
Save