[kteam-tools][PATCH] stable/create-stable-tracker: do not fail if obsolete Ubuntu series

Kamal Mostafa kamal at canonical.com
Mon Apr 13 16:29:36 UTC 2020


Sometimes, we need to continue creating tracking bugs even after
Launchpad stops supporting an Ubuntu series.  Do not fail in this case;
Just create the tracking bug without any series nomination.

More specifically, if the nomination step fails for any reason after the
bug has already been created (e.g. Launchpad timeout), do print the link
to the created bug.

Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 stable/create-stable-tracker | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
index c088b01f..6a300a59 100755
--- a/stable/create-stable-tracker
+++ b/stable/create-stable-tracker
@@ -221,9 +221,13 @@ class CreateTrackingBug(StdApp):
             sc = ubuntu.series_collection
             for s in sc:
                 if s.name == series_name:
-                    nomination = bug.lpbug.addNomination(target=s)
-                    if nomination.canApprove():
-                        nomination.approve()
+                    try:
+                        nomination = bug.lpbug.addNomination(target=s)
+                        if nomination.canApprove():
+                            nomination.approve()
+                    except:
+                        print("WARNING: Bug created, but series nomination failed!")
+                        pass
 
             if 'staging' in self.cfg:
                 print("https://bugs.%s.launchpad.net/bugs/%s" % (self.defaults['launchpad_services_root'], bug.id))
-- 
2.17.1




More information about the kernel-team mailing list