Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: third_party/twisted_8_1/twisted/names/resolve.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/twisted_8_1/twisted/names/hosts.py ('k') | third_party/twisted_8_1/twisted/names/root.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/twisted_8_1/twisted/names/resolve.py
diff --git a/third_party/twisted_8_1/twisted/names/resolve.py b/third_party/twisted_8_1/twisted/names/resolve.py
deleted file mode 100644
index b1f5d23842178b99d339310fa93617beb95cba60..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/names/resolve.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-
-"""
-Lookup a name using multiple resolvers.
-
-Future Plans: This needs someway to specify which resolver answered
-the query, or someway to specify (authority|ttl|cache behavior|more?)
-
-@author: U{Jp Calderone<mailto:exarkun@twistedmatrix.com>}
-"""
-
-from twisted.internet import defer, interfaces
-from twisted.names import dns
-from zope.interface import implements
-import common
-
-class FailureHandler:
- def __init__(self, resolver, query, timeout):
- self.resolver = resolver
- self.query = query
- self.timeout = timeout
-
-
- def __call__(self, failure):
- # AuthoritativeDomainErrors should halt resolution attempts
- failure.trap(dns.DomainError, defer.TimeoutError, NotImplementedError)
- return self.resolver(self.query, self.timeout)
-
-
-class ResolverChain(common.ResolverBase):
- """Lookup an address using multiple C{IResolver}s"""
-
- implements(interfaces.IResolver)
-
-
- def __init__(self, resolvers):
- common.ResolverBase.__init__(self)
- self.resolvers = resolvers
-
-
- def _lookup(self, name, cls, type, timeout):
- q = dns.Query(name, type, cls)
- d = self.resolvers[0].query(q, timeout)
- for r in self.resolvers[1:]:
- d = d.addErrback(
- FailureHandler(r.query, q, timeout)
- )
- return d
-
-
- def lookupAllRecords(self, name, timeout = None):
- d = self.resolvers[0].lookupAllRecords(name, timeout)
- for r in self.resolvers[1:]:
- d = d.addErrback(
- FailureHandler(r.lookupAllRecords, name, timeout)
- )
- return d
« no previous file with comments | « third_party/twisted_8_1/twisted/names/hosts.py ('k') | third_party/twisted_8_1/twisted/names/root.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698