<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_dns_info():
    '''
    return dns list
    '''
    dns_list = []
    try:
        with salt.utils.files.fopen('/etc/resolv.conf', 'r+') as dns_info:
            lines = dns_info.readlines()
            for line in lines:
                if 'nameserver' in line:
                    dns = line.split()[1].strip()
                    if dns not in dns_list:
                        dns_list.append(dns)
    except IOError:
        log.warning('Could not get domain\n')
    return dns_list