Skip to content

Commit

Permalink
processes: bugfix: make get_by_basename use the basename
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Mar 28, 2022
1 parent 2a2bce9 commit d6ecbe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rpcclient/rpcclient/darwin/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,10 @@ def get_by_pid(self, pid: int) -> Process:
raise ArgumentError(f'failed to locate process with pid: {pid}')

def get_by_basename(self, name: str) -> Process:
""" get process object by name """
""" get process object by basename """
proc_list = self.list()
for p in proc_list:
if p.name == name:
if p.basename == name:
return p
raise ArgumentError(f'failed to locate process with name: {name}')

Expand Down

0 comments on commit d6ecbe0

Please sign in to comment.