Skip to content

Commit 865bff5

Browse files
authored
Don't fail when no @SInCE tags are found in @SInCE updater (#11135)
1 parent 7beca3d commit 865bff5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

update-since-todo.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,17 @@ def analyze_files(commits_and_tags, dry_run=False):
105105
is_ci = "CI" in os.environ
106106
if is_ci:
107107
print("<details><summary>Detailed output</summary>\n\n")
108+
processed = 0
108109
with subprocess.Popen(cmd, stdout=subprocess.PIPE) as proc:
109110
for line in io.TextIOWrapper(proc.stdout):
110111
parts = line.rstrip().split(":", 2)
111112
analyze_file(parts[0], parts[1], commits_and_tags, dry_run=dry_run)
113+
processed += 1
112114
retcode = proc.wait()
113-
if retcode:
115+
if retcode not in (0, 1):
114116
raise subprocess.CalledProcessError(retcode, cmd)
115-
print()
117+
if processed == 0:
118+
print("No '@since TODO', '@Deprecated(since = \"TODO\")', or '@RestrictedSince(\"TODO\")' tags found.")
116119
if is_ci:
117120
print("</details>\n")
118121

0 commit comments

Comments
 (0)