mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-26 07:59:21 +08:00
This removes need for triggering and catching exceptions to report an error with stack trace.
24 lines
569 B
Python
Executable file
24 lines
569 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import sys
|
|
|
|
if len(sys.argv) != 2:
|
|
raise ValueError("Missing argument")
|
|
|
|
start = f"Weblate {sys.argv[1]}\n"
|
|
display = False
|
|
|
|
with open("docs/changes.rst") as handle:
|
|
for line in handle:
|
|
if display:
|
|
if line.startswith("Weblate "):
|
|
break
|
|
elif not line.startswith("--"):
|
|
print(line, end="")
|
|
elif line == start:
|
|
display = True
|
|
print(line, end="")
|