Skip to content

Commit d8f4c5c

Browse files
committed
bugs: fix bugs to open count
Resolves: #142 Signed-off-by: Arthur Zamarin <[email protected]>
1 parent 98bbf58 commit d8f4c5c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/pkgdev/scripts/pkgdev_bugs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,13 @@ def main(options, out: Formatter, err: Formatter):
525525
d.output_dot(options.dot)
526526
out.write(out.fg("green"), f"Dot file written to {options.dot}", out.reset)
527527

528+
bugs_count = len(tuple(node for node in d.nodes if node.bugno is None))
529+
if bugs_count == 0:
530+
out.write(out.fg("red"), "Nothing to do, exiting", out.reset)
531+
return 1
532+
528533
if not userquery(
529-
f"Continue and create {len(d.nodes)} stablereq bugs?", out, err, default_answer=False
534+
f"Continue and create {bugs_count} stablereq bugs?", out, err, default_answer=False
530535
):
531536
return 1
532537

0 commit comments

Comments
 (0)