diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-08-27 16:07:52 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-08-27 17:40:39 +0200 |
commit | 8bd71350abe48fdcfc0125e48fa97abdf31e1270 (patch) | |
tree | 2873d7fc77f9ec1992e24886a9feae80b48ffaef /lib/dnspython/dns/rdtypes/IN/NAPTR.py | |
parent | bd01a8e79faa3d657f01529c063cd0e09d711880 (diff) | |
download | samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.tar.gz samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.tar.bz2 samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.zip |
dnspython: Update to latest upstream snapshot.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Aug 27 17:40:39 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/dnspython/dns/rdtypes/IN/NAPTR.py')
-rw-r--r-- | lib/dnspython/dns/rdtypes/IN/NAPTR.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/dnspython/dns/rdtypes/IN/NAPTR.py b/lib/dnspython/dns/rdtypes/IN/NAPTR.py index a3cca55e1c..7fe043082b 100644 --- a/lib/dnspython/dns/rdtypes/IN/NAPTR.py +++ b/lib/dnspython/dns/rdtypes/IN/NAPTR.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, @@ -45,7 +45,7 @@ class NAPTR(dns.rdata.Rdata): __slots__ = ['order', 'preference', 'flags', 'service', 'regexp', 'replacement'] - + def __init__(self, rdclass, rdtype, order, preference, flags, service, regexp, replacement): super(NAPTR, self).__init__(rdclass, rdtype) @@ -76,7 +76,7 @@ class NAPTR(dns.rdata.Rdata): tok.get_eol() return cls(rdclass, rdtype, order, preference, flags, service, regexp, replacement) - + from_text = classmethod(from_text) def to_wire(self, file, compress = None, origin = None): @@ -86,7 +86,7 @@ class NAPTR(dns.rdata.Rdata): _write_string(file, self.service) _write_string(file, self.regexp) self.replacement.to_wire(file, compress, origin) - + def from_wire(cls, rdclass, rdtype, wire, current, rdlen, origin = None): (order, preference) = struct.unpack('!HH', wire[current : current + 4]) current += 4 @@ -98,7 +98,7 @@ class NAPTR(dns.rdata.Rdata): rdlen -= 1 if l > rdlen or rdlen < 0: raise dns.exception.FormError - s = wire[current : current + l] + s = wire[current : current + l].unwrap() current += l rdlen -= l strings.append(s) @@ -116,7 +116,7 @@ class NAPTR(dns.rdata.Rdata): def choose_relativity(self, origin = None, relativize = True): self.replacement = self.replacement.choose_relativity(origin, relativize) - + def _cmp(self, other): sp = struct.pack("!HH", self.order, self.preference) op = struct.pack("!HH", other.order, other.preference) |