

def __virtual__():
    short_name = __name__.rsplit('.')[(- 1)]
    mod_opts = __opts__.get(short_name, {
        
    })
    if mod_opts:
        if ((not cpy_error) and ('port' in mod_opts)):
            return __virtualname__
        if cpy_error:
            from distutils.version import LooseVersion as V
            if (('cherrypy' in globals()) and (V(cherrypy.__version__) < V(cpy_min))):
                error_msg = 'Required version of CherryPy is {0} or greater.'.format(cpy_min)
            else:
                error_msg = cpy_error
            logger.error("Not loading '%s'. Error loading CherryPy: %s", __name__, error_msg)
        if ('port' not in short_name):
            logger.error("Not loading '%s'. 'port' not specified in config", __name__)
    return False

dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_cherrypy/__init__.py __virtual__/VarMisuse@140/230 `mod_opts`->`short_name`