diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-04 23:05:16 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-04 23:05:16 +0200 |
commit | 6185fb4e9e3d3e654ad9f6325da0f4886013dda6 (patch) | |
tree | 81a767238fdd3b1902672330a49948d838acd2c7 /lib/dnspython/dns/rdtypes/IN/PX.py | |
parent | 5de2ec0def3e4ad0ead20b426e81509fd8e48c6d (diff) | |
download | samba-6185fb4e9e3d3e654ad9f6325da0f4886013dda6.tar.gz samba-6185fb4e9e3d3e654ad9f6325da0f4886013dda6.tar.bz2 samba-6185fb4e9e3d3e654ad9f6325da0f4886013dda6.zip |
dnspython: Update to latest upstream.
Diffstat (limited to 'lib/dnspython/dns/rdtypes/IN/PX.py')
-rw-r--r-- | lib/dnspython/dns/rdtypes/IN/PX.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/dnspython/dns/rdtypes/IN/PX.py b/lib/dnspython/dns/rdtypes/IN/PX.py index 4718944ff4..0f11290724 100644 --- a/lib/dnspython/dns/rdtypes/IN/PX.py +++ b/lib/dnspython/dns/rdtypes/IN/PX.py @@ -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 |