'Remove all rules from a chain.'

def empty_chain(self, chain, wrap=True):

    chained_rules = [rule for rule in self.rules if ((rule.chain == chain) and (rule.wrap == wrap))]
    if chained_rules:
        self.dirty = True
    for rule in chained_rules:
        self.rules.remove(rule)
