From f66a2f031784ec17ee1e124a6bb53c5a519b5c57 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 24 Apr 2015 16:53:35 +1200 Subject: [PATCH] KCC: improve docstring and comments for KCC.load_site() Signed-off-by: Douglas Bagnall Reviewed-by: Garming Sam Reviewed-by: Andrew Bartlett --- source4/scripting/bin/samba_kcc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc index 753d502226e..97d1618074c 100755 --- a/source4/scripting/bin/samba_kcc +++ b/source4/scripting/bin/samba_kcc @@ -167,14 +167,19 @@ class KCC(object): self.sitelink_table[dnstr] = sitelink def load_site(self, dn_str): - """Helper for load_my_site and load_all_sites. It puts all the site's - DSAs into the KCC indices. + """Helper for load_my_site and load_all_sites. + + Put all the site's DSAs into the KCC indices. + + :param dn_str: a site dn_str + :return: the Site object pertaining to the dn_str """ site = Site(dn_str, unix_now) site.load_site(self.samdb) - # I am not sure why, but we avoid replacing the site with an - # identical copy. + # We avoid replacing the site with an identical copy in case + # somewhere else has a reference to the old one, which would + # lead to all manner of confusion and chaos. guid = str(site.site_guid) if guid not in self.site_table: self.site_table[guid] = site