feat(system): fix(ci): make json_handler.log_operation non-fatal in copy_template — prevents CI failure when spawn log dir missing

Co-Authored-By: @devpulse <devpulse@aipass>
This commit is contained in:
AIOSAI
2026-04-25 21:16:43 -07:00
co-authored by @devpulse
parent 8fbc144657
commit 84018413a7
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -1 +0,0 @@
{"file": "/home/patrick/Projects/AIPass/src/aipass/api/tests/test_usage_tracker.py", "errors": [{"line": 372, "message": "E501: Line too long (139 > 120)"}, {"line": 387, "message": "E501: Line too long (126 > 120)"}, {"line": 394, "message": "E501: Line too long (139 > 120)"}, {"line": 408, "message": "E501: Line too long (123 > 120)"}, {"line": 415, "message": "E501: Line too long (139 > 120)"}, {"line": 438, "message": "E501: Line too long (139 > 120)"}]}
+4 -1
View File
@@ -76,7 +76,10 @@ def copy_template(template_dir, target_dir, replacements):
shutil.copy2(item, dest)
copied.append(f"{dest_rel} (binary)")
json_handler.log_operation("template_copied", data={"target": str(target_dir)})
try:
json_handler.log_operation("template_copied", data={"target": str(target_dir)})
except Exception as exc:
logger.info("json_handler.log_operation failed (non-fatal): %s", exc)
return copied, skipped