From a287c60ce5e8c952a87ce1c616818bc0b8f20291 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Mon, 25 Nov 2019 14:31:50 +0100 Subject: [PATCH] don't add retired components to Bugzilla Signed-off-by: Nils Philippsen --- distgit_bugzilla_sync/script.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 5c9efab..9a53c46 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -417,9 +417,15 @@ class BugzillaProxy: ) print(f"[NOCHANGE] {package}/{bz_product_name}") else: + bz_product_name = self.config['products'][collection].get('bz_product_name', collection) + if retired: + if self.config['verbose']: + print(f"[NOADD] {bz_product_name}/{package}") + return + # Add component data = { - 'product': self.config['products'][collection].get('bz_product_name', collection), + 'product': bz_product_name, 'component': package, 'description': description or 'NA', 'initialowner': owner_email, @@ -430,7 +436,7 @@ class BugzillaProxy: data['initialcclist'] = initial_cc_emails if self.config["verbose"]: - print('[ADDCOMP] %s/%s' % (data["product"], data["component"])) + print(f"[ADDCOMP] {bz_product_name}/{package}") for key in ["initialowner", "description", "initialqacontact", "initialcclist", "is_active"]: if print_fas_names and key in ('initialowner',