email: Utilize convert_mapping_to_xml

Change-Id: I05e7bad41e3f7329af0da313cffdd0ee297a53ba
Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
This commit is contained in:
tanhengyeow 2018-09-07 23:03:44 +08:00 committed by Sorin Sbarnea
parent 190ddf0480
commit 7f4c9ff67f
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):