summaryrefslogtreecommitdiff
path: root/lib/dnspython/dns/rdtypes/IN/PX.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dnspython/dns/rdtypes/IN/PX.py')
-rw-r--r--lib/dnspython/dns/rdtypes/IN/PX.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dnspython/dns/rdtypes/IN/PX.py b/lib/dnspython/dns/rdtypes/IN/PX.py
index 0f11290724..1422b83487 100644
--- a/lib/dnspython/dns/rdtypes/IN/PX.py
+++ b/lib/dnspython/dns/rdtypes/IN/PX.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
+# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
@@ -31,7 +31,7 @@ class PX(dns.rdata.Rdata):
@see: RFC 2163"""
__slots__ = ['preference', 'map822', 'mapx400']
-
+
def __init__(self, rdclass, rdtype, preference, map822, mapx400):
super(PX, self).__init__(rdclass, rdtype)
self.preference = preference
@@ -42,7 +42,7 @@ class PX(dns.rdata.Rdata):
map822 = self.map822.choose_relativity(origin, relativize)
mapx400 = self.mapx400.choose_relativity(origin, relativize)
return '%d %s %s' % (self.preference, map822, mapx400)
-
+
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
preference = tok.get_uint16()
map822 = tok.get_name()
@@ -51,7 +51,7 @@ class PX(dns.rdata.Rdata):
mapx400 = mapx400.choose_relativity(origin, relativize)
tok.get_eol()
return cls(rdclass, rdtype, preference, map822, mapx400)
-
+
from_text = classmethod(from_text)
def to_wire(self, file, compress = None, origin = None):
@@ -59,7 +59,7 @@ class PX(dns.rdata.Rdata):
file.write(pref)
self.map822.to_wire(file, None, origin)
self.mapx400.to_wire(file, None, origin)
-
+
def from_wire(cls, rdclass, rdtype, wire, current, rdlen, origin = None):
(preference, ) = struct.unpack('!H', wire[current : current + 2])
current += 2