Skip to content

Commit bc1c07c

Browse files
authored
Update client.py
1 parent d636c6c commit bc1c07c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎python_agent_harness/client.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import random
1414
import socket as _socket
1515
import sys
16+
import tempfile
1617
import threading
1718
import time
1819
import uuid
@@ -128,7 +129,7 @@ def _llm_log_path() -> Path:
128129
d = Path(log_dir)
129130
d.mkdir(parents=True, exist_ok=True)
130131
return d / f"python-agent-harness-{date_str}-{session_id}.json"
131-
return Path(f"/tmp/python-agent-harness-{date_str}-{session_id}.json")
132+
return Path(tempfile.gettempdir()) / f"python-agent-harness-{date_str}-{session_id}.json"
132133

133134

134135
def _log_llm_interaction(
@@ -196,8 +197,12 @@ def _resolve_ca_bundle() -> str | bool:
196197
"/etc/pki/tls/certs/ca-bundle.crt",
197198
"/etc/ssl/certs/ca-certificates.crt",
198199
"/etc/ssl/ca-bundle.pem",
200+
# Windows (Git for Windows, conda, etc.)
201+
os.path.join(os.environ.get("PROGRAMFILES", ""), "Git", "mingw64", "ssl", "cert.pem"),
202+
os.path.join(os.environ.get("PROGRAMFILES(X86)", ""), "Git", "mingw64", "ssl", "cert.pem"),
203+
os.path.join(os.environ.get("CONDA_PREFIX", ""), "ssl", "cert.pem"),
199204
):
200-
if os.path.isfile(cand):
205+
if cand and os.path.isfile(cand):
201206
return cand
202207
return True
203208

0 commit comments

Comments
 (0)