'Convert hostname to IP address'

def _resolv_name(self, hostname):

    ip = hostname
    try:
        ip = socket.gethostbyname(hostname)
    except Exception as e:
        logger.debug('{}:    Cannot    convert    {}    to    IP    address    ({})'.format(self.plugin_name, hostname, e))
    return ip
