From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A10E158009 for ; Thu, 22 Jun 2023 16:16:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5153E0864; Thu, 22 Jun 2023 16:16:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87CDCE0864 for ; Thu, 22 Jun 2023 16:16:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4869D335D8A for ; Thu, 22 Jun 2023 16:16:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 36D3FA95 for ; Thu, 22 Jun 2023 16:16:38 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1687450569.d8f4c5c7b198d6ad0dc6bfe88163b5ae0cff2b48.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgdev:main commit in: src/pkgdev/scripts/ X-VCS-Repository: proj/pkgcore/pkgdev X-VCS-Files: src/pkgdev/scripts/pkgdev_bugs.py X-VCS-Directories: src/pkgdev/scripts/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: d8f4c5c7b198d6ad0dc6bfe88163b5ae0cff2b48 X-VCS-Branch: main Date: Thu, 22 Jun 2023 16:16:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0dad4ba1-2806-448e-88d9-3c5d898ca0c3 X-Archives-Hash: 02d96a6283154f98b6b71971ce2dee8b commit: d8f4c5c7b198d6ad0dc6bfe88163b5ae0cff2b48 Author: Arthur Zamarin gentoo org> AuthorDate: Thu Jun 22 16:16:09 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Thu Jun 22 16:16:09 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgdev.git/commit/?id=d8f4c5c7 bugs: fix bugs to open count Resolves: https://github.com/pkgcore/pkgdev/issues/142 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgdev/scripts/pkgdev_bugs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pkgdev/scripts/pkgdev_bugs.py b/src/pkgdev/scripts/pkgdev_bugs.py index 0a3ff91..08da876 100644 --- a/src/pkgdev/scripts/pkgdev_bugs.py +++ b/src/pkgdev/scripts/pkgdev_bugs.py @@ -525,8 +525,13 @@ def main(options, out: Formatter, err: Formatter): d.output_dot(options.dot) out.write(out.fg("green"), f"Dot file written to {options.dot}", out.reset) + bugs_count = len(tuple(node for node in d.nodes if node.bugno is None)) + if bugs_count == 0: + out.write(out.fg("red"), "Nothing to do, exiting", out.reset) + return 1 + if not userquery( - f"Continue and create {len(d.nodes)} stablereq bugs?", out, err, default_answer=False + f"Continue and create {bugs_count} stablereq bugs?", out, err, default_answer=False ): return 1