UNEXPECTED(failure): samba.tests.samba_tool.gpo.samba.tests.samba_tool.gpo.GpoCmdTestCase.test_backup_restore_generalize(ad_dc:local)
REASON: Exception: Exception: Traceback (most recent call last):
File "/tmp/samba-testbase/b28/samba-ad-dc-1/bin/python/samba/tests/samba_tool/gpo.py", line 434, in test_backup_restore_generalize
self.assertIsNone(has_difference(os.path.join(new_path, 'policy',
This caused because prior to 3.8 minodom.toprettyxml() was sorting the
attribute order, now it preserves the attribute order specified by the user
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
def write_xml(self, filename):
with open(filename, 'wb') as f:
root = Element('PolFile')
+ root.attrib['num_entries'] = str(self.pol_file.num_entries)
root.attrib['signature'] = self.pol_file.header.signature
root.attrib['version'] = str(self.pol_file.header.version)
- root.attrib['num_entries'] = str(self.pol_file.num_entries)
for entry in self.pol_file.entries:
child = SubElement(root, 'Entry')
# child.attrib['size'] = str(entry.size)