def import_blacklist(self, parser):
        blacklist = parser.blacklist
        self.log("Loading blacklist...")
        n = 0
        for entry in blacklist:
            try:
                api.add_to_matching_blacklist(self.db, entry.excluded)
                self.display('load_blacklist.tmpl', entry=entry.excluded)
                n += 1
            except ValueError as e:
                raise RuntimeError(str(e))
            except AlreadyExistsError as e:
                msg = "%s. Not added." % str(e)
                self.warning(msg)
        self.log("%d/%d blacklist entries loaded" % (n, len(blacklist)))