samba_kcc: clarify readonly logging, removing now unused function
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 13 Dec 2017 04:35:29 +0000 (17:35 +1300)
committerKarolin Seeger <kseeger@samba.org>
Sat, 13 Jan 2018 16:37:07 +0000 (17:37 +0100)
The unused function was somewhat misnamed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/kcc/__init__.py
python/samba/kcc/kcc_utils.py

index 3ebdb39d29dccbb32fccbe0d64931f81745ae5b9..3c31ef6b4b5a4a4def7ad3a88b15c041c0a18b0a 100644 (file)
@@ -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
index 9e6aa5f41f4bb46705f84a22b0fb1032e8eee795..785349997f8f475807f30ac420144e280702ffd4 100644 (file)
@@ -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.