summaryrefslogtreecommitdiff
path: root/lib/dnspython/dns/rdtypes/ANY/SSHFP.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dnspython/dns/rdtypes/ANY/SSHFP.py')
-rw-r--r--lib/dnspython/dns/rdtypes/ANY/SSHFP.py8
1 files changed, 4 insertions, 4 deletions
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