mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
kcc: use py3 compatible sort in rarely visited branch
This won't have worked for some time, but nobody has complained, because nobody uses DS_NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6e61d032c4
commit
c4f338b7e4
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import random
|
import random
|
||||||
import uuid
|
import uuid
|
||||||
|
from functools import cmp_to_key
|
||||||
import itertools
|
import itertools
|
||||||
from samba import unix2nttime, nttime2unix
|
from samba import unix2nttime, nttime2unix
|
||||||
from samba import ldb, dsdb, drs_utils
|
from samba import ldb, dsdb, drs_utils
|
||||||
@ -1285,7 +1285,7 @@ class KCC(object):
|
|||||||
# ELSE
|
# ELSE
|
||||||
# SORT bhs in a random order
|
# SORT bhs in a random order
|
||||||
if site.is_random_bridgehead_disabled():
|
if site.is_random_bridgehead_disabled():
|
||||||
bhs.sort(sort_dsa_by_gc_and_guid)
|
bhs.sort(key=cmp_to_key(sort_dsa_by_gc_and_guid))
|
||||||
else:
|
else:
|
||||||
random.shuffle(bhs)
|
random.shuffle(bhs)
|
||||||
debug.DEBUG_YELLOW(bhs)
|
debug.DEBUG_YELLOW(bhs)
|
||||||
|
Loading…
Reference in New Issue
Block a user