def insertRuleset(self, ruleset, domain):
		'''增加一个robots.txt规则集'''
		cur = self.conn.cursor()
		cur.execute("SELECT did FROM Domains WHERE domain=?", (domain,))
		did = cur.fetchone()[0]
		cur.execute("INSERT INTO Rulesets VALUES (NULL,?,?)",(did, ruleset))
		# 写入到文件
		self.conn.commit()
def _swdb_group_remove(self, group_id, pkg_types, pkgs):
        if not self._base.history.group.get(group_id):
            self._raise_or_warn(self._ignore_installed, _("Group id '%s' is not installed.") % group_id)
            return

        swdb_group = self._create_swdb_group(group_id, pkg_types, pkgs)

        if swdb_group is not None:
            self._base.history.group.remove(swdb_group)