]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
script/backport-resolve-issue: better error message
authorNathan Cutler <ncutler@suse.com>
Thu, 5 Sep 2019 14:14:28 +0000 (16:14 +0200)
committerNathan Cutler <ncutler@suse.com>
Thu, 5 Sep 2019 14:14:28 +0000 (16:14 +0200)
When a point release is published, sometimes the new target version is not yet
in Redmine. Issue a better error message in this case.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/script/backport-resolve-issue

index 86ce07f180f75b044cfb15908c299a6c995294b7..9fed53f10f594e8f5aa8e5540161bff969f753bf 100755 (executable)
@@ -404,9 +404,10 @@ Ceph version:     base {}, target {}'''.format(self.github_url, pr_title_trunc,
         assert ver_to_release()[maybe_stable], \
             "SHA1 {} is not based on any known stable release ({})".format(sha1, maybe_stable)
         tv = "v{}.{}.{}".format(x, y, int(z) + 1)
-        assert version2version_id[tv], \
-            "Target version {} is not in Redmine".format(tv)
-        self.target_version = tv
+        if tv in version2version_id:
+            self.target_version = tv
+        else:
+            raise Exception("Version {} not found in Redmine".format(tv))
 
     def mogrify_github_pr_desc(self):
         if not self.github_pr_desc: