From: Douglas Bagnall Date: Wed, 13 Dec 2017 04:35:29 +0000 (+1300) Subject: samba_kcc: clarify readonly logging, removing now unused function X-Git-Tag: samba-4.8.0rc1~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=315f445a0256b0b63a344286debb6a27053c4d69;p=thirdparty%2Fsamba.git samba_kcc: clarify readonly logging, removing now unused function The unused function was somewhat misnamed. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/kcc/__init__.py b/python/samba/kcc/__init__.py index 3ebdb39d29d..3c31ef6b4b5 100644 --- a/python/samba/kcc/__init__.py +++ b/python/samba/kcc/__init__.py @@ -1095,9 +1095,9 @@ class KCC(object): if self.readonly: # Display any to be deleted or modified repsTo - text = n_rep.dumpstr_reps_to() - if text: - logger.info("REMOVING REPS-TO:\n%s" % text) + for rt in n_rep.rep_repsTo: + if rt.to_be_deleted: + logger.info("REMOVING REPS-TO: %s" % rt) # Peform deletion from our tables but perform # no database modification diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py index 9e6aa5f41f4..785349997f8 100644 --- a/python/samba/kcc/kcc_utils.py +++ b/python/samba/kcc/kcc_utils.py @@ -418,9 +418,6 @@ class NCReplica(NamingContext): def dumpstr_to_be_modified(self): return '\n'.join(str(x) for x in self.rep_repsFrom if x.is_modified()) - def dumpstr_reps_to(self): - return '\n'.join(str(x) for x in self.rep_repsTo if x.to_be_deleted) - def load_fsmo_roles(self, samdb): """Given an NC replica which has been discovered thru the nTDSDSA database object, load the fSMORoleOwner attribute.