diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 8d545f5..00d3d26 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -937,11 +937,16 @@ class DistgitBugzillaSync: if project["namespace"] not in self.env["pdc_types"]: project["branches"] = [] project["products"] = [] - self.errors["configuration"].append( - f'Namespace `{project["namespace"]}` not found in the pdc_type ' - f'configuration key, project {project["namespace"]}/{project["name"]} ' - "ignored" - ) + error = f'Namespace `{project["namespace"]}` not found in the pdc_type ' \ + f'configuration key -- ignoring it' + if not error in self.errors["configuration"]: + self.errors["configuration"].append(error) + if self.env["verbose"]: + print( + f'Namespace `{project["namespace"]}` not found in the pdc_type ' + f'configuration key, project {project["namespace"]}/{project["name"]} ' + "ignored" + ) continue pdc_type = self.env["pdc_types"][project["namespace"]] @@ -1156,7 +1161,10 @@ class DistgitBugzillaSync: if self.env["verbose"] or self.env["dryrun"]: print("*" * 80) print("\n".join(report)) - if not self.env["dryrun"]: + + # Do not send the email in dryrun or when the error only relates to + # configuration (which will always happen for flatpaks and tests) + if not self.env["dryrun"] and list(self.errors.keys()) != ["configuration"]: self.send_email( self.env["email"]["from"], self.env["email"]["notify_admins"],