def __init__(self, ip=None):
    if not ip:
      try:
        ip = socket.gethostbyname(MY_RESOLVER_HOST)
      except:
        print "Could not resolve %s: %s" % (MY_RESOLVER_HOST, util.GetLastExceptionString())
        # TODO(tstromberg): Find a more elegant fallback solution.
        ip = '127.0.0.1'
           
    super(MyResolverInfo, self).__init__(ip=ip)
dataset/ETHPy150Open catap/namebench/libnamebench/providers.py/MyResolverInfo.__init__/original