pids: case insensitive string comparison for process names (#52564)
This commit is contained in:
parent
b8da83cfe0
commit
e428441a1d
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
def get_pid(name):
|
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():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue