The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(pm): name the URL when an update pin fails with an HTTP error
ethernet24573527b117
diff --git a/pm/cli.py b/pm/cli.pyindex f1bf1f7c1f0..6a42abe3d37 100644--- a/pm/cli.py+++ b/pm/cli.py@@ -8,6 +8,7 @@ import shutilimport subprocessimport sysimport time+import urllib.errorfrom pathlib import Pathfrom pm import termux_libs@@ -602,8 +603,12 @@ def _apply_pins(changed: list, lockfile) -> int:# One broken pin — a package's resolution bug or one target's upstream# pool skew (rolling Termux pool 404 while nodejs.org is ahead) — must# not zero out the whole run. Pin the rest, report the failure (#125386).- print(f"✗ {d.name} pin failed: {e}")- failed[d.name] = f"{type(e).__name__}: {e}"+ # str(HTTPError) omits the URL, and a bare "404" can't tell you which+ # upstream (nodejs.org, Termux pool, mirror) is missing the file.+ url = e.url if isinstance(e, urllib.error.HTTPError) else None+ detail = f"{e} ({url})" if url else str(e)+ print(f"✗ {d.name} pin failed: {detail}")+ failed[d.name] = f"{type(e).__name__}: {detail}"continuelockfile.set_pin(d.name, d.version, artifacts)pinned.append(d.name)