From 6185fb4e9e3d3e654ad9f6325da0f4886013dda6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 4 Sep 2010 23:05:16 +0200 Subject: dnspython: Update to latest upstream. --- lib/dnspython/dns/rdtypes/ANY/SSHFP.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/dnspython/dns/rdtypes/ANY/SSHFP.py') diff --git a/lib/dnspython/dns/rdtypes/ANY/SSHFP.py b/lib/dnspython/dns/rdtypes/ANY/SSHFP.py index bc54f5e260..162dda5c48 100644 --- a/lib/dnspython/dns/rdtypes/ANY/SSHFP.py +++ b/lib/dnspython/dns/rdtypes/ANY/SSHFP.py @@ -30,7 +30,7 @@ class SSHFP(dns.rdata.Rdata): @see: draft-ietf-secsh-dns-05.txt""" __slots__ = ['algorithm', 'fp_type', 'fingerprint'] - + def __init__(self, rdclass, rdtype, algorithm, fp_type, fingerprint): super(SSHFP, self).__init__(rdclass, rdtype) @@ -43,7 +43,7 @@ class SSHFP(dns.rdata.Rdata): self.fp_type, dns.rdata._hexify(self.fingerprint, chunksize=128)) - + def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True): algorithm = tok.get_uint8() fp_type = tok.get_uint8() @@ -51,14 +51,14 @@ class SSHFP(dns.rdata.Rdata): fingerprint = fingerprint.decode('hex_codec') tok.get_eol() return cls(rdclass, rdtype, algorithm, fp_type, fingerprint) - + from_text = classmethod(from_text) def to_wire(self, file, compress = None, origin = None): header = struct.pack("!BB", self.algorithm, self.fp_type) file.write(header) file.write(self.fingerprint) - + def from_wire(cls, rdclass, rdtype, wire, current, rdlen, origin = None): header = struct.unpack("!BB", wire[current : current + 2]) current += 2 -- cgit