def __virtual__():
    short_name = __name__.rsplit('.')[-1]
    mod_opts = __opts__.get(short_name, {})

    if mod_opts:
        # User has a rest_cherrypy section in config; assume the user wants to
        # run the module and increase logging severity to be helpful

        # Everything looks good; return the module name
        if not cpy_error and 'port' in mod_opts:
            return __virtualname__

        # CherryPy wasn't imported; explain why
        if cpy_error:
            from distutils.version import LooseVersion as V  # pylint: disable=E0611

            if 'cherrypy' in globals() or 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)

        # Missing port config
        if 'port' not in mod_opts:
            logger.error("Not loading '%s'. 'port' not specified in config",
                    __name__)

    return False
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_cherrypy/__init__.py/__virtual__/operator `and` -> `or`