From 4fdccc0d35f0d009e07a9b08edc34dc0fb37c89c Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 11 Oct 2018 17:23:54 +1300 Subject: [PATCH] s4/dsdb/pytest/sort: use compat.cmp_fn instead of cmp Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- source4/dsdb/tests/python/sort.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/dsdb/tests/python/sort.py b/source4/dsdb/tests/python/sort.py index f1247be9e1f..ac989bd4356 100644 --- a/source4/dsdb/tests/python/sort.py +++ b/source4/dsdb/tests/python/sort.py @@ -14,7 +14,7 @@ import re sys.path.insert(0, "bin/python") import samba from samba.tests.subunitrun import SubunitOptions, TestProgram - +from samba.compat import cmp_fn import samba.getopt as options from samba.auth import system_session @@ -286,10 +286,10 @@ class BaseSortTests(samba.tests.TestCase): return locale.strcoll(a[0], b[0]) def cmp_binary(a, b): - return cmp(a[0], b[0]) + return cmp_fn(a[0], b[0]) def cmp_numeric(a, b): - return cmp(int(a[0]), int(b[0])) + return cmp_fn(int(a[0]), int(b[0])) # For testing simplicity, the attributes in here need to be # unique for each user. Otherwise there are multiple possible -- 2.47.2