def load_repsFrom(self, samdb):
        """Given an NC replica which has been discovered thru the nTDSDSA
        database object, load the repsFrom attribute for the local replica.
        held by my dsa.  The repsFrom attribute is not replicated so this
        attribute is relative only to the local DSA that the samdb exists on
        """
        try:
            res = samdb.search(base=self.nc_dnstr, scope=ldb.SCOPE_BASE,
                               attrs=[ "repsFrom" ])

        except ldb.LdbError, (enum, estr):
            raise Exception("Unable to find NC for (%s) - (%s)" %
                            (self.nc_dnstr, estr))

        msg = res[0]

        # Possibly no repsFrom if this is a singleton DC
        if "repsFrom" in msg:
            for value in msg["repsFrom"]:
                rep = RepsFromTo(self.nc_dnstr,
                                 ndr_unpack(drsblobs.repsFromToBlob, value))
                self.rep_repsFrom.append(rep)
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/kcc_utils.py/NCReplica.load_repsFrom/original