Skip to content

Commit

Permalink
pids: case insensitive string comparison for process names (#52564)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeAbyss authored and Akasurde committed Mar 14, 2019
1 parent b8da83c commit e428441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/system/pids.py
Expand Up @@ -53,7 +53,7 @@


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():
Expand Down

0 comments on commit e428441

Please sign in to comment.