feat: catch patch.object on a command

This commit is contained in:
Abdessamad Derraz committed 2026-11-21 15:48:32 +01:00
1 parent e0f4d7eba5
commit c3054bef4c
5 files changed
+13 -7

No files matched your search

+2 -2
View File
@@ -34,10 +34,10 @@ from model import releaserecord
from core.cli import require_directory
from core.paths import PLATFORMS_DIR
from core.artifacts import write_text_atomic
from release import notes
from release.notes import (
changelog_url,
closing_lines,
gather_thanks,
previous_record_commit,
refused_words,
render,
@@ -79,7 +79,7 @@ def main() -> int:
thanks = [line for line in args.thanks.read_text(encoding="utf-8").splitlines()
if line.strip()]
else:
thanks = gather_thanks()
thanks = notes.gather_thanks()
except (subprocess.CalledProcessError, ValueError, KeyError, OSError) as exc:
detail = getattr(exc, "stderr", "") or exc
print(f"Error: cannot gather the thanks: {str(detail).strip()}. Pass a checked list"