diff --git a/.claude/hooks/.diagnostics_state.json b/.claude/hooks/.diagnostics_state.json deleted file mode 100644 index 3f6df996..00000000 --- a/.claude/hooks/.diagnostics_state.json +++ /dev/null @@ -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)"}]} \ No newline at end of file diff --git a/src/aipass/spawn/apps/handlers/file_ops.py b/src/aipass/spawn/apps/handlers/file_ops.py index 17de0e9b..c3fc907c 100644 --- a/src/aipass/spawn/apps/handlers/file_ops.py +++ b/src/aipass/spawn/apps/handlers/file_ops.py @@ -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