python/samba/gp_parse: PY3 fdeploy_sids needs to use key method for sort
authorNoel Power <noel.power@suse.com>
Mon, 15 Oct 2018 15:04:25 +0000 (16:04 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Oct 2018 03:50:24 +0000 (05:50 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/gp_parse/gp_ini.py

index 6c3d9391d63e1c49279ba917b6b5cf1e24208c26..196175e16518b7de1bf7db113f5eb30754be611d 100644 (file)
@@ -199,7 +199,7 @@ class GPFDeploy1IniParser(GPIniParser):
     def custom_entities(self, root, global_entities):
         entities = []
         fdeploy_sids = root.findall('.//Section[@fdeploy_SID]')
-        fdeploy_sids.sort()
+        fdeploy_sids.sort(key = lambda x: x.tag)
 
         for sid in fdeploy_sids:
             old_attrib = sid.attrib['fdeploy_SID']