From: Douglas Bagnall Date: Thu, 11 Oct 2018 00:37:28 +0000 (+1300) Subject: python/kcc: use compat.cmp_fn (PY3) X-Git-Tag: tdb-1.3.17~1160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=159fdcb6010020b06e5a55b66c3e72071183152d;p=thirdparty%2Fsamba.git python/kcc: use compat.cmp_fn (PY3) Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- diff --git a/python/samba/kcc/__init__.py b/python/samba/kcc/__init__.py index 5e1762d5b6f..6c6c202fa2c 100644 --- a/python/samba/kcc/__init__.py +++ b/python/samba/kcc/__init__.py @@ -44,7 +44,7 @@ from samba.kcc.graph import Vertex from samba.kcc.debug import DEBUG, DEBUG_FN, logger from samba.kcc import debug -from samba.compat import text_type +from samba.compat import cmp_fn def sort_dsa_by_gc_and_guid(dsa1, dsa2): @@ -61,7 +61,7 @@ def sort_dsa_by_gc_and_guid(dsa1, dsa2): return -1 if not dsa1.is_gc() and dsa2.is_gc(): return +1 - return cmp(ndr_pack(dsa1.dsa_guid), ndr_pack(dsa2.dsa_guid)) + return cmp_fn(ndr_pack(dsa1.dsa_guid), ndr_pack(dsa2.dsa_guid)) def is_smtp_replication_available():