]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
KCC: improve docstring and comments for KCC.load_site()
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 24 Apr 2015 04:53:35 +0000 (16:53 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 30 May 2015 19:05:24 +0000 (21:05 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/bin/samba_kcc

index 753d502226e79b9f956b8db341e781bbab6f0ac8..97d1618074c79347ac4a96144f71bee811f6d154 100755 (executable)
@@ -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