We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b8a2f9 commit d163647Copy full SHA for d163647
1 file changed
Doc/tools/version_next.py
@@ -63,10 +63,14 @@ def main(argv):
63
lines = []
64
with open(path, encoding='utf-8') as file:
65
for lineno, line in enumerate(file, start=1):
66
- if match := DIRECTIVE_RE.fullmatch(line):
67
- line = match['before'] + version + match['after']
68
- num_changed_lines += 1
69
- lines.append(line)
+ try:
+ if match := DIRECTIVE_RE.fullmatch(line):
+ line = match['before'] + version + match['after']
+ num_changed_lines += 1
70
+ lines.append(line)
71
+ except Exception as exc:
72
+ exc.add_note(f'processing line {path}:{lineno}')
73
+ raise
74
if num_changed_lines:
75
if args.verbose:
76
print(f'Updating file {path} ({num_changed_lines} changes)',
0 commit comments