From 683342b7a000f370cdc7456ce51cfb69783ced58 Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Mon, 29 Oct 2018 14:49:28 +1300 Subject: 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 Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/netcmd/ldapcmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py index bccf6c799c2..59991a6c956 100644 --- a/python/samba/netcmd/ldapcmp.py +++ b/python/samba/netcmd/ldapcmp.py @@ -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) -- cgit v1.2.1