def _checkDuplicates(self, cu, role):
        # check for case insensitive user conflicts -- avoids race with
        # other adders on case-differentiated names
        cu.execute("SELECT userGroupId FROM UserGroups "
                   "WHERE LOWER(UserGroup)=LOWER(?)", role)
        if len(cu.fetchall()) > 1:
            # undo our insert
            self.db.rollback()
            raise errors.RoleAlreadyExists('role: %s' % role)
dataset/ETHPy150Open sassoftware/conary/conary/repository/netrepos/netauth.py/NetworkAuthorization._checkDuplicates/original