python/kcc: use compat.cmp_fn (PY3)
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 11 Oct 2018 00:37:28 +0000 (13:37 +1300)
committerNoel Power <npower@samba.org>
Thu, 25 Oct 2018 19:45:58 +0000 (21:45 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
python/samba/kcc/__init__.py

index 5e1762d5b6f3a1f19db56172dc4e11c0c29961de..6c6c202fa2ceb22392145d7f7982d89a60c65db4 100644 (file)
@@ -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():