mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 12:58:51 -06:00
fix: write the verify excerpt whole
generate_report_excerpt.py rewrote wiki/reading-reports.md with write_text, which test_atomic_artifacts refuses for a generator: an interrupted run left a truncated page. It now goes through write_text_atomic like the other generators.
This commit is contained in:
1 parent
82d134cd8b
commit
37aadbd4e0
1 file changed
+3
-1
@@ -22,6 +22,8 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from artifacts import write_text_atomic
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parent.parent
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
PAGE = ROOT / "wiki" / "reading-reports.md"
|
PAGE = ROOT / "wiki" / "reading-reports.md"
|
||||||
BLOCK = re.compile(
|
BLOCK = re.compile(
|
||||||
@@ -77,7 +79,7 @@ def main() -> int:
|
|||||||
print(f"STALE {PAGE.relative_to(ROOT)}: the verify excerpt is not the run's. "
|
print(f"STALE {PAGE.relative_to(ROOT)}: the verify excerpt is not the run's. "
|
||||||
"Run python scripts/generate_report_excerpt.py", file=sys.stderr)
|
"Run python scripts/generate_report_excerpt.py", file=sys.stderr)
|
||||||
return 1
|
return 1
|
||||||
PAGE.write_text(text[:found.start(2)] + body + text[found.end(2):], encoding="utf-8")
|
write_text_atomic(str(PAGE), text[:found.start(2)] + body + text[found.end(2):])
|
||||||
print(f"Wrote {PAGE.relative_to(ROOT)}")
|
print(f"Wrote {PAGE.relative_to(ROOT)}")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user