mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: replace debug print() with logger.error() in file_tools
Stray print() in write_file_tool exception handler leaked debug output to stdout. Replaced with logger.error() which is already set up in the file. Authored by memosr. Co-authored-by: memosr <memosr@users.noreply.github.com>
This commit is contained in:
commit
c837ef949d
1 changed files with 1 additions and 1 deletions
|
|
@ -238,7 +238,7 @@ def write_file_tool(path: str, content: str, task_id: str = "default") -> str:
|
|||
result = file_ops.write_file(path, content)
|
||||
return json.dumps(result.to_dict(), ensure_ascii=False)
|
||||
except Exception as e:
|
||||
print(f"[FileTools] write_file error: {type(e).__name__}: {e}", flush=True)
|
||||
logger.error("write_file error: %s: %s", type(e).__name__, e)
|
||||
return json.dumps({"error": str(e)}, ensure_ascii=False)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue