public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/tatt:master commit in: scripts/
@ 2021-02-10  2:47 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-02-10  2:47 UTC (permalink / raw
  To: gentoo-commits

commit:     0c0c7c098f18234c4ebdec93c1799b16e8b26cd0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 10 02:47:20 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 10 02:47:20 2021 +0000
URL:        https://gitweb.gentoo.org/proj/tatt.git/commit/?id=0c0c7c09

scripts/tatt: drop invalid ~ prefix to arch

Signed-off-by: Sam James <sam <AT> gentoo.org>

 scripts/tatt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/tatt b/scripts/tatt
index 463e737..7524c8b 100755
--- a/scripts/tatt
+++ b/scripts/tatt
@@ -168,7 +168,7 @@ if options.bugnum:
         if response["cf_stabilisation_atoms"]:
             myJob.packageList = packageFinder.findPackages(response["cf_stabilisation_atoms"], config['arch'], get_repo_dir(config['repodir']), options.bugnum)
             if len(myJob.packageList) == 0 and ("KEYWORDREQ" in response["keywords"] or response["component"] == "Keywording"):
-                myJob.packageList = packageFinder.findPackages(response["cf_stabilisation_atoms"], '~' + config['arch'], get_repo_dir(config['repodir']), options.bugnum)
+                myJob.packageList = packageFinder.findPackages(response["cf_stabilisation_atoms"], config['arch'], get_repo_dir(config['repodir']), options.bugnum)
         else:
             response = session.get(config["bugzilla-url"] + "/rest/bug/{}/attachment".format(options.bugnum), params=params).json()["bugs"][str(options.bugnum)]
             for attachment in response:


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/tatt:master commit in: scripts/
@ 2021-05-29  8:33 Rolf Eike Beer
  0 siblings, 0 replies; 2+ messages in thread
From: Rolf Eike Beer @ 2021-05-29  8:33 UTC (permalink / raw
  To: gentoo-commits

commit:     f21b0d05feb942e814a94190b63e0b918f622bab
Author:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
AuthorDate: Sat May 29 08:29:56 2021 +0000
Commit:     Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
CommitDate: Sat May 29 08:33:22 2021 +0000
URL:        https://gitweb.gentoo.org/proj/tatt.git/commit/?id=f21b0d05

output a proper error message if the bug does not exist

Otherwise one would see the following misleading message:

    File "/usr/lib/python-exec/python3.8/tatt", line 155, in <module>
      response = response["bugs"][0]
  IndexError: list index out of range

Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>

 scripts/tatt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/tatt b/scripts/tatt
index 7524c8b..7d0f378 100755
--- a/scripts/tatt
+++ b/scripts/tatt
@@ -152,6 +152,10 @@ if options.bugnum:
     if "message" in response:
         print(response["message"])
         sys.exit(1)
+    if len(response["bugs"]) == 0:
+        print("bug " + options.bugnum + " not found in bugzilla")
+        sys.exit(1)
+
     response = response["bugs"][0]
     if "KEYWORDREQ" in response["keywords"] or response["component"] == "Keywording":
         # This is a keywording bug:


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-29  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-29  8:33 [gentoo-commits] proj/tatt:master commit in: scripts/ Rolf Eike Beer
  -- strict thread matches above, loose matches on Subject: below --
2021-02-10  2:47 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox