def resolve_the_google():
    print 'started resolution!'
    g_ip = resolve_dns_name("www.google.com")
    print "www.google.com's ip is %s" % g_ip
    try:
        bad_host = "www.g8asdf21oogle.com"
        print "now checking %s" % bad_host
        resolve_dns_name(bad_host)
    except DNSResolutionError:
        print "yep, it failed as expected"
    else:
        raise RuntimeError("The bad host resolved.  That's unexpected.")
    g_ip = resolve_dns_name("www.google.com")
    g_ip = resolve_dns_name("www.google.com")
    g_ip = resolve_dns_name("www.google.com")
    g_ip = resolve_dns_name("www.google.com")
    a.halt()
dataset/ETHPy150Open dieseldev/diesel/examples/resolve_names.py/resolve_the_google/original