mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-09 07:04:44 +00:00
Replace tabs with spaces; remove trailing whitespace.
This commit is contained in:
parent
d0140d22ae
commit
8c124c5e93
14 changed files with 28 additions and 25 deletions
3
third_party/dnspython/changelog.txt
vendored
3
third_party/dnspython/changelog.txt
vendored
|
|
@ -21,3 +21,6 @@ The following changes were made to the original dnspython sources:
|
|||
|
||||
* added search patterns for domain names
|
||||
Changed: resolver.py
|
||||
|
||||
* Replaced tabs with spaces, remove trailing whitespace.
|
||||
Changed: *.py
|
||||
|
|
|
|||
2
third_party/dnspython/dns/edns.py
vendored
2
third_party/dnspython/dns/edns.py
vendored
|
|
@ -114,7 +114,7 @@ class GenericOption(Option):
|
|||
from_wire = classmethod(from_wire)
|
||||
|
||||
def _cmp(self, other):
|
||||
return cmp(self.data, other.data)
|
||||
return cmp(self.data, other.data)
|
||||
|
||||
_type_to_class = {
|
||||
}
|
||||
|
|
|
|||
2
third_party/dnspython/dns/entropy.py
vendored
2
third_party/dnspython/dns/entropy.py
vendored
|
|
@ -112,7 +112,7 @@ class EntropyPool(object):
|
|||
else:
|
||||
rand = self.random_8
|
||||
max = 255
|
||||
return (first + size * rand() // (max + 1))
|
||||
return (first + size * rand() // (max + 1))
|
||||
|
||||
pool = EntropyPool()
|
||||
|
||||
|
|
|
|||
2
third_party/dnspython/dns/flags.py
vendored
2
third_party/dnspython/dns/flags.py
vendored
|
|
@ -89,7 +89,7 @@ def to_text(flags):
|
|||
@rtype: string"""
|
||||
|
||||
return _to_text(flags, _by_value, _flags_order)
|
||||
|
||||
|
||||
|
||||
def edns_from_text(text):
|
||||
"""Convert a space-separated list of EDNS flag text values into a EDNS
|
||||
|
|
|
|||
4
third_party/dnspython/dns/inet.py
vendored
4
third_party/dnspython/dns/inet.py
vendored
|
|
@ -45,7 +45,7 @@ def inet_pton(family, text):
|
|||
implemented.
|
||||
@rtype: string
|
||||
"""
|
||||
|
||||
|
||||
if family == AF_INET:
|
||||
return dns.ipv4.inet_aton(text)
|
||||
elif family == AF_INET6:
|
||||
|
|
@ -105,4 +105,4 @@ def is_multicast(text):
|
|||
return (first == 255)
|
||||
except StandardError:
|
||||
raise ValueError
|
||||
|
||||
|
||||
|
|
|
|||
2
third_party/dnspython/dns/name.py
vendored
2
third_party/dnspython/dns/name.py
vendored
|
|
@ -552,7 +552,7 @@ def from_unicode(text, origin = root):
|
|||
text = u''
|
||||
if text:
|
||||
if text == u'.':
|
||||
return Name(['']) # no Unicode "u" on this constant!
|
||||
return Name(['']) # no Unicode "u" on this constant!
|
||||
for c in text:
|
||||
if escaping:
|
||||
if edigits == 0:
|
||||
|
|
|
|||
10
third_party/dnspython/dns/opcode.py
vendored
10
third_party/dnspython/dns/opcode.py
vendored
|
|
@ -66,7 +66,7 @@ def from_flags(flags):
|
|||
@param flags: int
|
||||
@rtype: int
|
||||
"""
|
||||
|
||||
|
||||
return (flags & 0x7800) >> 11
|
||||
|
||||
def to_flags(value):
|
||||
|
|
@ -74,9 +74,9 @@ def to_flags(value):
|
|||
flags.
|
||||
@rtype: int
|
||||
"""
|
||||
|
||||
|
||||
return (value << 11) & 0x7800
|
||||
|
||||
|
||||
def to_text(value):
|
||||
"""Convert an opcode to text.
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ def to_text(value):
|
|||
@raises UnknownOpcode: the opcode is unknown
|
||||
@rtype: string
|
||||
"""
|
||||
|
||||
|
||||
text = _by_value.get(value)
|
||||
if text is None:
|
||||
text = str(value)
|
||||
|
|
@ -98,7 +98,7 @@ def is_update(flags):
|
|||
@type flags: int
|
||||
@rtype: bool
|
||||
"""
|
||||
|
||||
|
||||
if (from_flags(flags) == UPDATE):
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
8
third_party/dnspython/dns/rdtypes/ANY/LOC.py
vendored
8
third_party/dnspython/dns/rdtypes/ANY/LOC.py
vendored
|
|
@ -221,26 +221,26 @@ class LOC(dns.rdata.Rdata):
|
|||
t = tok.get_string()
|
||||
if t[-1] == 'm':
|
||||
t = t[0 : -1]
|
||||
altitude = float(t) * 100.0 # m -> cm
|
||||
altitude = float(t) * 100.0 # m -> cm
|
||||
|
||||
token = tok.get().unescape()
|
||||
if not token.is_eol_or_eof():
|
||||
value = token.value
|
||||
if value[-1] == 'm':
|
||||
value = value[0 : -1]
|
||||
size = float(value) * 100.0 # m -> cm
|
||||
size = float(value) * 100.0 # m -> cm
|
||||
token = tok.get().unescape()
|
||||
if not token.is_eol_or_eof():
|
||||
value = token.value
|
||||
if value[-1] == 'm':
|
||||
value = value[0 : -1]
|
||||
hprec = float(value) * 100.0 # m -> cm
|
||||
hprec = float(value) * 100.0 # m -> cm
|
||||
token = tok.get().unescape()
|
||||
if not token.is_eol_or_eof():
|
||||
value = token.value
|
||||
if value[-1] == 'm':
|
||||
value = value[0 : -1]
|
||||
vprec = float(value) * 100.0 # m -> cm
|
||||
vprec = float(value) * 100.0 # m -> cm
|
||||
tok.get_eol()
|
||||
|
||||
return cls(rdclass, rdtype, latitude, longitude, altitude,
|
||||
|
|
|
|||
4
third_party/dnspython/dns/tsigkeyring.py
vendored
4
third_party/dnspython/dns/tsigkeyring.py
vendored
|
|
@ -23,7 +23,7 @@ def from_text(textring):
|
|||
"""Convert a dictionary containing (textual DNS name, base64 secret) pairs
|
||||
into a binary keyring which has (dns.name.Name, binary secret) pairs.
|
||||
@rtype: dict"""
|
||||
|
||||
|
||||
keyring = {}
|
||||
for keytext in textring:
|
||||
keyname = dns.name.from_text(keytext)
|
||||
|
|
@ -35,7 +35,7 @@ def to_text(keyring):
|
|||
"""Convert a dictionary containing (dns.name.Name, binary secret) pairs
|
||||
into a text keyring which has (textual DNS name, base64 secret) pairs.
|
||||
@rtype: dict"""
|
||||
|
||||
|
||||
textring = {}
|
||||
for keyname in keyring:
|
||||
keytext = dns.name.to_text(keyname)
|
||||
|
|
|
|||
6
third_party/dnspython/tests/name.py
vendored
6
third_party/dnspython/tests/name.py
vendored
|
|
@ -25,7 +25,7 @@ import dns.e164
|
|||
class NameTestCase(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.origin = dns.name.from_text('example.')
|
||||
|
||||
|
||||
def testFromTextRel1(self):
|
||||
n = dns.name.from_text('foo.bar')
|
||||
self.failUnless(n.labels == ('foo', 'bar', ''))
|
||||
|
|
@ -68,7 +68,7 @@ class NameTestCase(unittest.TestCase):
|
|||
r'..',
|
||||
r'.a',
|
||||
r'\\..',
|
||||
'\\', # yes, we don't want the 'r' prefix!
|
||||
'\\', # yes, we don't want the 'r' prefix!
|
||||
r'\0',
|
||||
r'\00',
|
||||
r'\00Z',
|
||||
|
|
@ -352,7 +352,7 @@ class NameTestCase(unittest.TestCase):
|
|||
n = dns.name.from_text('FOO.bar', None)
|
||||
d = n.to_digestable(dns.name.root)
|
||||
self.failUnless(d == '\x03foo\x03bar\x00')
|
||||
|
||||
|
||||
def testBadDigestable(self):
|
||||
def bad():
|
||||
n = dns.name.from_text('FOO.bar', None)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import dns.rdatatype
|
|||
class RdTypeAndClassTestCase(unittest.TestCase):
|
||||
|
||||
# Classes
|
||||
|
||||
|
||||
def test_class_meta1(self):
|
||||
self.failUnless(dns.rdataclass.is_metaclass(dns.rdataclass.ANY))
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ class RdTypeAndClassTestCase(unittest.TestCase):
|
|||
self.failUnlessRaises(ValueError, bad)
|
||||
|
||||
# Types
|
||||
|
||||
|
||||
def test_type_meta1(self):
|
||||
self.failUnless(dns.rdatatype.is_metatype(dns.rdatatype.ANY))
|
||||
|
||||
|
|
|
|||
2
third_party/dnspython/tests/rrset.py
vendored
2
third_party/dnspython/tests/rrset.py
vendored
|
|
@ -18,7 +18,7 @@ import unittest
|
|||
import dns.rrset
|
||||
|
||||
class RRsetTestCase(unittest.TestCase):
|
||||
|
||||
|
||||
def testEqual1(self):
|
||||
r1 = dns.rrset.from_text('foo', 300, 'in', 'a', '10.0.0.1', '10.0.0.2')
|
||||
r2 = dns.rrset.from_text('FOO', 300, 'in', 'a', '10.0.0.2', '10.0.0.1')
|
||||
|
|
|
|||
2
third_party/dnspython/tests/set.py
vendored
2
third_party/dnspython/tests/set.py
vendored
|
|
@ -21,7 +21,7 @@ import dns.set
|
|||
S = dns.set.Set
|
||||
|
||||
class SimpleSetTestCase(unittest.TestCase):
|
||||
|
||||
|
||||
def testLen1(self):
|
||||
s1 = S()
|
||||
self.failUnless(len(s1) == 0)
|
||||
|
|
|
|||
2
third_party/dnspython/tests/zone.py
vendored
2
third_party/dnspython/tests/zone.py
vendored
|
|
@ -129,7 +129,7 @@ class ZoneTestCase(unittest.TestCase):
|
|||
for n in names:
|
||||
print >> f, z[n].to_text(n)
|
||||
self.failUnless(f.getvalue() == example_text_output)
|
||||
|
||||
|
||||
def testTorture1(self):
|
||||
#
|
||||
# Read a zone containing all our supported RR types, and
|
||||
|
|
|
|||
Loading…
Reference in a new issue