1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-16 20:59:12 +03:00

netcmd/ldapcmp: rename __eq__ to diff

This method actually changed both objects and print info.
__eq__ is not a proper name and is not designed for this case.
Rename to diff.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joe Guo
2018-10-29 14:49:28 +13:00
committed by Andrew Bartlett
parent 5f47c04cf3
commit 683342b7a0

View File

@ -740,7 +740,7 @@ class LDAPBundle(object):
self.size = len(self.dn_list)
self.dn_list = sorted(self.dn_list)
def __eq__(self, other):
def diff(self, other):
res = True
if self.size != other.size:
self.log("\n* DN lists have different size: %s != %s" % (self.size, other.size))
@ -993,7 +993,7 @@ class cmd_ldapcmp(Command):
b2 = LDAPBundle(con2, context=context, filter_list=filter_list,
outf=self.outf, errf=self.errf)
if b1 == b2:
if b1.diff(b2):
if not quiet:
self.outf.write("\n* Result for [%s]: SUCCESS\n" %
context)