diff --git a/src/rpcclient/rpcclient/darwin/processes.py b/src/rpcclient/rpcclient/darwin/processes.py index 2d819f27..5d958b6a 100644 --- a/src/rpcclient/rpcclient/darwin/processes.py +++ b/src/rpcclient/rpcclient/darwin/processes.py @@ -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}')