diff options
author | Joe Guo <joeg@catalyst.net.nz> | 2018-10-29 14:49:28 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-11-21 07:46:18 +0100 |
commit | 683342b7a000f370cdc7456ce51cfb69783ced58 (patch) | |
tree | 7b68299d1a5e0fb0a5bf3ae4c8b2982a0cb57792 /python | |
parent | 5f47c04cf3e7ef90a3521c097f60af49bd37615d (diff) | |
download | samba-683342b7a000f370cdc7456ce51cfb69783ced58.tar.gz |
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>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/netcmd/ldapcmp.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |