builders: fix mavenName sorting with py35
On Fedora 24, the mavenName vs group XML is sorted differently depending on whether we're using Python 3.5 or Python 2.7. This was causing the test to fail on Python 3.5. Avoid relying on the dict sort behavior. Since there are only two XML elements, write each one explicitly. Change-Id: I53f88e53d7fc4d81e325b341b9444c4950044565
This commit is contained in:
parent
c62b0a10d0
commit
08a08db7b3
|
@ -1439,16 +1439,12 @@ def maven_builder(parser, xml_parent, data):
|
|||
"""
|
||||
maven = XML.SubElement(xml_parent, 'org.jfrog.hudson.maven3.Maven3Builder')
|
||||
|
||||
required = {
|
||||
'mavenName': 'name',
|
||||
'goals': 'goals',
|
||||
}
|
||||
|
||||
for key in required:
|
||||
try:
|
||||
XML.SubElement(maven, key).text = data[required[key]]
|
||||
except KeyError:
|
||||
raise MissingAttributeError(required[key])
|
||||
try:
|
||||
XML.SubElement(maven, 'mavenName').text = data['name']
|
||||
XML.SubElement(maven, 'goals').text = data['goals']
|
||||
except KeyError as e:
|
||||
# exception will contain the missing key name
|
||||
raise MissingAttributeError(e.arg[0])
|
||||
|
||||
XML.SubElement(maven, 'rootPom').text = data.get('pom', 'pom.xml')
|
||||
XML.SubElement(maven, 'mavenOpts').text = data.get('maven-opts', '')
|
||||
|
|
Loading…
Reference in New Issue