email: Utilize convert_mapping_to_xml
Change-Id: I05e7bad41e3f7329af0da313cffdd0ee297a53ba Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
This commit is contained in:
parent
190ddf0480
commit
7f4c9ff67f
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user