def get_txt(name):
    # pydns needs Unicode, but DKIM's d= is ASCII (already punycoded).
    try:
        unicode_name = name.decode('ascii')
    except UnicodeDecodeError:
        return None
    txt = _get_txt(unicode_name)
    if txt:
      txt = txt.encode('utf-8')
    return txt
Return a TXT record associated with a DNS name.
dataset/ETHPy150Open Flolagale/mailin/python/dkim/dnsplug.py/get_txt