Name the line of a non-UTF-8 README.md

This commit is contained in:
2026-09-26 15:02:57 +02:00
parent 885d35b808
commit 9c797dea94
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ def read_premises(root):
except OSError as failure:
sys.exit(f"README.md in {root}: {failure.strerror} - no premises.")
except UnicodeDecodeError as failure:
sys.exit(f"README.md is not UTF-8 at byte {failure.start} - no premises.")
sys.exit(f"README.md is not UTF-8 on line {failure.object[:failure.start].count(b'\n') + 1} - no premises.")
for name in ("Goals", "Audience"):
bodies = found.get(name, [])
if not bodies: