Merge "email: Utilize convert_mapping_to_xml"

This commit is contained in:
Zuul 2018-09-21 01:25:11 +00:00 committed by Gerrit Code Review
commit 968824a61f
1 changed files with 6 additions and 4 deletions

View File

@ -66,10 +66,12 @@ def email(registry, xml_parent, data):
XML.SubElement(mailer, 'dontNotifyEveryUnstableBuild').text = 'false'
else:
XML.SubElement(mailer, 'dontNotifyEveryUnstableBuild').text = 'true'
XML.SubElement(mailer, 'sendToIndividuals').text = str(
data.get('send-to-individuals', False)).lower()
XML.SubElement(mailer, 'perModuleEmail').text = str(
data.get('notify-for-each-module', True)).lower()
mapping = [
('send-to-individuals', 'sendToIndividuals', False),
('notify-for-each-module', 'perModuleEmail', True),
]
helpers.convert_mapping_to_xml(
mailer, data, mapping, fail_required=False)
def findbugs(registry, xml_parent, data):