def __virtual__():
    if os.path.isdir('/etc/alternatives'):
        return True
    return (False, 'Cannot load alternatives module: /etc/alternatives dir not found')
Only if alternatives dir is available
dataset/ETHPy150Open saltstack/salt/salt/modules/alternatives.py/__virtual__