diff options
author | Noel Power <noel.power@suse.com> | 2018-06-15 13:06:13 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-07-13 01:12:25 +0200 |
commit | 409ad5c0f07445ea7d12466b56fbfbccfe71c2d1 (patch) | |
tree | fc749e0aba8372e097df09836d1ca6382e3588be /source4 | |
parent | 77ee94c3df1180da5cb6c7cc478bd814e1d02258 (diff) | |
download | samba-409ad5c0f07445ea7d12466b56fbfbccfe71c2d1.tar.gz |
s4/torture/drs/python: use cmp_fn for cmp (for py2/py3 compat)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/drs/python/drs_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py index c9518ef7358..91b76b3c6aa 100644 --- a/source4/torture/drs/python/drs_base.py +++ b/source4/torture/drs/python/drs_base.py @@ -39,7 +39,7 @@ from ldb import ( Message, FLAG_MOD_REPLACE, ) - +from samba.compat import cmp_fn class DrsBaseTestCase(SambaToolCmdTest): """Base class implementation for all DRS python tests. @@ -515,7 +515,7 @@ class AbstractLink: print("AbstractLink.__internal_cmp__(%r, %r) => wrong type" % (self, other)) return NotImplemented - c = cmp(self.selfGUID_blob, other.selfGUID_blob) + c = cmp_fn(self.selfGUID_blob, other.selfGUID_blob) if c != 0: if verbose: print("AbstractLink.__internal_cmp__(%r, %r) => %d different identifier" % (self, other, c)) @@ -536,7 +536,7 @@ class AbstractLink: print("AbstractLink.__internal_cmp__(%r, %r) => %d different FLAG_ACTIVE" % (self, other, c)) return c - c = cmp(self.targetGUID_blob, other.targetGUID_blob) + c = cmp_fn(self.targetGUID_blob, other.targetGUID_blob) if c != 0: if verbose: print("AbstractLink.__internal_cmp__(%r, %r) => %d different target" % (self, other, c)) |