def __getdistro_setenv(servername):
    """
    """
    server = [s for s in env.bootmachine_servers
              if s.name == servername][0]
    env.servername = server.name
    env.host = server.public_ip
    env.host_string = "{0}:{1}".format(server.public_ip, server.port)
    env.hosts = [server.public_ip]
    env.port = server.port
    env.user = server.user
    distro_module = [s for s in settings.SERVERS
                     if s["servername"] == server.name][0]["distro_module"]
    try:
        __import__(distro_module)
        return sys.modules[distro_module]
    except __HOLE__:
        abort("Unable to import the module: {0}".format(distro_module))
dataset/ETHPy150Open rizumu/bootmachine/bootmachine/contrib/configurators/salt.py/__getdistro_setenv