mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 01:21:43 +00:00
fix: add all_profiles param + narrow exception handling
- add all_profiles=False to find_gateway_pids() and kill_gateway_processes() so hermes update and gateway stop --all can still discover processes across all profiles - narrow bare 'except Exception' to (OSError, subprocess.TimeoutExpired) - update test mocks to match new signatures
This commit is contained in:
parent
b80e318168
commit
d82580b25b
5 changed files with 28 additions and 15 deletions
|
|
@ -260,7 +260,7 @@ class TestWaitForGatewayExit:
|
|||
def test_kill_gateway_processes_force_uses_helper(self, monkeypatch):
|
||||
calls = []
|
||||
|
||||
monkeypatch.setattr(gateway, "find_gateway_pids", lambda exclude_pids=None: [11, 22])
|
||||
monkeypatch.setattr(gateway, "find_gateway_pids", lambda exclude_pids=None, all_profiles=False: [11, 22])
|
||||
monkeypatch.setattr(gateway, "terminate_pid", lambda pid, force=False: calls.append((pid, force)))
|
||||
|
||||
killed = gateway.kill_gateway_processes(force=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue