def readEntitlementDirectory(self):
        if not os.path.isdir(self.entitlementDirectory):
            return

        try:
            files = os.listdir(self.entitlementDirectory)
        except __HOLE__:
            return
        for basename in files:
            try:
                if os.path.isfile(os.path.join(self.entitlementDirectory,
                                               basename)):
                    ent = loadEntitlement(self.entitlementDirectory, basename)
                    if not ent:
                        continue
                    self.entitlement.addEntitlement(ent[0], ent[2],
                                                    entClass = ent[1])
            except OSError:
                return
dataset/ETHPy150Open sassoftware/conary/conary/conarycfg.py/ConaryConfiguration.readEntitlementDirectory