diff options
| author | Noel Power <noel.power@suse.com> | 2020-03-13 17:32:20 +0000 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2020-03-19 20:46:42 +0000 |
| commit | 5406205382fa8177ea0993a5b0996dc5e7cb5abe (patch) | |
| tree | 361b21dc45174555b700204396f896cd158fca13 /python | |
| parent | ff70d7cc3ae60a0e6868f95357ee486ed7491e9a (diff) | |
| download | samba-5406205382fa8177ea0993a5b0996dc5e7cb5abe.tar.gz samba-5406205382fa8177ea0993a5b0996dc5e7cb5abe.tar.bz2 samba-5406205382fa8177ea0993a5b0996dc5e7cb5abe.zip | |
python/samba/gp_parse: Fix test errors with python3.8
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>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/gp_parse/gp_pol.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/gp_parse/gp_pol.py b/python/samba/gp_parse/gp_pol.py index 67ecd584dc0..8a3d5f58ec1 100644 --- a/python/samba/gp_parse/gp_pol.py +++ b/python/samba/gp_parse/gp_pol.py @@ -101,9 +101,9 @@ class GPPolParser(GPParser): 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) |
