1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4/scripting: PY3 need to convert cmp funct to key func for sort.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power 2018-10-15 10:36:19 +01:00 committed by Andrew Bartlett
parent 412002629e
commit dcf787b263

View File

@ -70,6 +70,7 @@ from samba.upgradehelpers import (dn_sort, get_paths, newprovision,
increment_calculated_keyversion_number,
print_provision_ranges)
from samba.xattr import copytree_with_xattrs
from samba.compat import cmp_to_key_fn
# make sure the script dies immediately when hitting control-C,
# rather than raising KeyboardInterrupt. As we do all database
@ -1133,8 +1134,8 @@ def update_partition(ref_samdb, samdb, basedn, names, schema, provisionUSNs, pre
# Sort the missing object in order to have object of the lowest level
# first (which can be containers for higher level objects)
listMissing.sort(dn_sort)
listPresent.sort(dn_sort)
listMissing.sort(key=cmp_to_key_fn(dn_sort))
listPresent.sort(key=cmp_to_key_fn(dn_sort))
# The following lines is to load the up to
# date schema into our current LDB