fix: rename local url-quote import to avoid shadowing module-level _q (#1471)
The 'from urllib.parse import quote as _q' at line 734 shadows the module-level _q (istrstrstrstrstrstrIMAPutility) imported from email_helpers, causing UnboundLocalError at lines 191 and 278 where _q is used before the local import executes. This silently breaks the entire auto-summarize pass.
This commit is contained in:
committed by
GitHub
parent
441905bc13
commit
5b0c7442ee
@@ -731,8 +731,8 @@ async def _auto_summarize_pass_single(days_back: int = 1, account_id: str | None
|
||||
from src.settings import load_settings as _ls
|
||||
_pub = (_ls().get("app_public_url") or "").rstrip("/")
|
||||
uid_str = uid.decode() if isinstance(uid, bytes) else str(uid)
|
||||
from urllib.parse import quote as _q
|
||||
open_url = f"{_pub}/#email={_q(_folder, safe='')}:{uid_str}" if _pub else ""
|
||||
from urllib.parse import quote as _url_q
|
||||
open_url = f"{_pub}/#email={_url_q(_folder, safe='')}:{uid_str}" if _pub else ""
|
||||
|
||||
alert_subject = f"[{urgency.upper()}] {subject}"
|
||||
alert_body = (
|
||||
|
||||
Reference in New Issue
Block a user