def __virtual__():
    if not salt.utils.which('iptables'):
        return (False, 'The iptables execution module cannot be loaded: iptables not installed.')

    return True
Only load the module if iptables is installed
dataset/ETHPy150Open saltstack/salt/salt/modules/iptables.py/__virtual__