v1.7.1: fix all P1-P4, C1-C6, H1-H6, M1-M7, L1-L3 from error.md — async migrations, CSS variables, SQL validation, event loop, prompt injection, VCF parsing, race conditions, unused imports, gitignore

This commit is contained in:
2026-05-29 03:46:41 +03:00
parent 72b6879f4b
commit 54af5892d5
21 changed files with 406 additions and 156 deletions
+6 -2
View File
@@ -1,9 +1,12 @@
import subprocess
import os
import logging
from typing import Optional
from app.config import settings
from app.config_reader import config_reader
logger = logging.getLogger(__name__)
class EmailSender:
def __init__(self):
@@ -32,8 +35,9 @@ class EmailSender:
timeout=30,
)
return proc.returncode == 0
except Exception:
return self._send_debug(to, subject, body, from_addr)
except Exception as e:
logger.error(f"Email send failed: {e}, falling back to debug log")
return self._send_debug(to, subject, body, from_addr)
def _send_debug(self, to: str, subject: str, body: str, from_addr: str) -> bool:
log_dir = os.path.join(os.path.dirname(__file__), "..", "logs")