Merge "Update copyartifact_build_selector_param to use convert_to_xml()"

This commit is contained in:
Jenkins 2017-06-27 16:34:20 +00:00 committed by Gerrit Code Review
commit 9d4259bef8
1 changed files with 5 additions and 7 deletions

View File

@ -750,13 +750,11 @@ def copyartifact_build_selector_param(registry, xml_parent, data):
t = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.'
'BuildSelectorParameter')
try:
name = data['name']
except KeyError:
raise MissingAttributeError('name')
XML.SubElement(t, 'name').text = name
XML.SubElement(t, 'description').text = data.get('description', '')
mapping = [
('name', 'name', None),
('description', 'description', ''),
]
convert_mapping_to_xml(t, data, mapping, fail_required=True)
copyartifact_build_selector(t, data, 'defaultSelector')