code: def read_host_file(path):
    
    res = []
    for l in file(path).xreadlines():
      hostname = l.strip()
      if hostname:
        res.append(hostname)
    return res
docs: Read the host file. Return a list of hostnames.