mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: use Path.read_text() instead of open() in browser_tool
This commit is contained in:
parent
e28dc13cd5
commit
7891050e06
1 changed files with 1 additions and 1 deletions
|
|
@ -1523,7 +1523,7 @@ def cleanup_browser(task_id: Optional[str] = None) -> None:
|
|||
pid_file = os.path.join(socket_dir, f"{session_name}.pid")
|
||||
if os.path.isfile(pid_file):
|
||||
try:
|
||||
daemon_pid = int(open(pid_file).read().strip())
|
||||
daemon_pid = int(Path(pid_file).read_text().strip())
|
||||
os.kill(daemon_pid, signal.SIGTERM)
|
||||
logger.debug("Killed daemon pid %s for %s", daemon_pid, session_name)
|
||||
except (ProcessLookupError, ValueError, PermissionError, OSError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue