[PATCH] link-to-tracker: fail if tracker bug is not found

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Tue Apr 4 15:49:04 UTC 2017


Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
---
 stable/link-to-tracker | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/stable/link-to-tracker b/stable/link-to-tracker
index b9a3f05..d3d84a4 100755
--- a/stable/link-to-tracker
+++ b/stable/link-to-tracker
@@ -151,11 +151,16 @@ class Tracking():
         retval = 1
         try:
             target_package, target_series = s.repo_info
+            found = False
             for bugid in s.trackers(s.project_tracked):
                 tasks_by_name = s.create_tasks_by_name_mapping(bugid, s.project_tracked)
                 if '%s (Ubuntu %s)' % (target_package, target_series.title()) in tasks_by_name:
+                    found = True
                     break
 
+            if found == False:
+                raise AppError('Cannot find tracker bug matching package %s series %s' % (target_package,target_series))
+                exit(retval)
             # -------------------------------------------------------------------------------------
             # C H A N G E L O G   W O R K
 
-- 
2.9.3





More information about the kernel-team mailing list