def load_sitelink(self, samdb):
        """Given a siteLink object with an prior initialization
        for the object's DN, search for the DN and load attributes
        from the samdb.
        """
        attrs = [ "options",
                  "systemFlags",
                  "cost",
                  "schedule",
                  "replInterval",
                  "siteList" ]
        try:
            res = samdb.search(base=self.dnstr, scope=ldb.SCOPE_BASE,
                               attrs=attrs)

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

        msg = res[0]

        if "options" in msg:
            self.options = int(msg["options"][0])

        if msg in "systemFlags":
            self.system_flags = int(msg["systemFlags"][0])

        if "cost" in msg:
            self.cost = int(msg["cost"][0])

        if "replInterval" in msg:
            self.interval = int(msg["replInterval"][0])

        if "siteList" in msg:
            for value in msg["siteList"]:
                dsdn = dsdb_Dn(samdb, value)
                dnstr = str(dsdn.dn)
                if dnstr not in self.site_list:
                    self.site_list.append(dnstr)
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/kcc_utils.py/SiteLink.load_sitelink/swapped operands of `in`