def retry(t, p, *args):
    warnings.warn(
        "twisted.names.root.retry is deprecated since Twisted 10.0.  Use a "
        "Resolver object for retry logic.", category=DeprecationWarning,
        stacklevel=2)

    assert t, "Timeout is required"
    t = list(t)
    def errback(failure):
        failure.trap(defer.TimeoutError)
        if not t:
            return failure
        return p.query(timeout=t.pop(0), *args
            ).addErrback(errback
            )
    return p.query(timeout=t.pop(0), *args
        ).addErrback(errback
        )
Issue a query one or more times.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/names/root.py/retry