def flush(self, chain):
        """ Mark rules as flushed """

        if self.user_is_root():
            if len(chain) > 0:
                # Check chain
                if not self.is_valid_chain(chain):
                    return

                chains = [chain]
            else:
                chains = self.current_table.iterkeys()

            # Flush
            for chain in chains:
                self.current_table[chain] = []

            self.exit()
        else:
            self.no_permission()
dataset/ETHPy150Open basilfx/kippo-extra/kippo_extra/commands/iptables.py/command_iptables.flush/original