chore: 删 tmp 调试文件,裸 except 改命名异常+日志
- 删除被跟踪的 tmp_check_desc.py / tmp_desc_snip.txt - bridge_manager discovery、generate release 抓取的裸 except Exception 改命名异常 + logger.warning(T8) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -124,7 +124,8 @@ def warm_cursor_bridge(force: bool = False) -> None:
|
||||
)
|
||||
try:
|
||||
discovery = _read_discovery_polling(process)
|
||||
except Exception:
|
||||
except (RuntimeError, OSError, ValueError) as exc:
|
||||
logger.warning("Cursor bridge discovery 失败,终止子进程:%s", exc)
|
||||
process.kill()
|
||||
process.wait(timeout=5)
|
||||
raise
|
||||
|
||||
@@ -473,7 +473,8 @@ def _fetch_latest_release_title(repo: str) -> str | None:
|
||||
return None
|
||||
title = entry.find("a:title", ns)
|
||||
return title.text.strip() if title is not None and title.text else None
|
||||
except Exception:
|
||||
except (httpx.HTTPError, ET.ParseError, OSError) as exc:
|
||||
logger.warning("读取 %s release 失败:%s", atom_url, exc)
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import re
|
||||
|
||||
import certifi
|
||||
import httpx
|
||||
|
||||
url = "https://skills.sh/vercel-labs/skills/find-skills"
|
||||
r = httpx.get(url, headers={"User-Agent": "Mozilla/5.0"}, timeout=20, verify=certifi.where())
|
||||
chunks = re.findall(r'self\.__next_f\.push\(\[1,"(.*?)"\]\)', r.text, re.DOTALL)
|
||||
blob = "\n".join(chunks).encode("utf-8").decode("unicode_escape", errors="ignore")
|
||||
for needle in ("description", "Helps users", "SKILL.md", "summary"):
|
||||
print(needle, blob.count(needle))
|
||||
idx = blob.find("Helps users")
|
||||
if idx >= 0:
|
||||
print(blob[idx : idx + 300])
|
||||
Binary file not shown.
Reference in New Issue
Block a user