Home | Trees | Indices | Help |
|
---|
|
1 # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license 2 3 # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. 4 # 5 # Permission to use, copy, modify, and distribute this software and its 6 # documentation for any purpose with or without fee is hereby granted, 7 # provided that the above copyright notice and this permission notice 8 # appear in all copies. 9 # 10 # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES 11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR 13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 16 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 18 import dns.exception 19 import dns.rdata 20 import dns.name24 25 """RP record 26 27 @ivar mbox: The responsible person's mailbox 28 @type mbox: dns.name.Name object 29 @ivar txt: The owner name of a node with TXT records, or the root name 30 if no TXT records are associated with this RP. 31 @type txt: dns.name.Name object 32 @see: RFC 1183""" 33 34 __slots__ = ['mbox', 'txt'] 35 408342 mbox = self.mbox.choose_relativity(origin, relativize) 43 txt = self.txt.choose_relativity(origin, relativize) 44 return "{} {}".format(str(mbox), str(txt))45 46 @classmethod48 mbox = tok.get_name() 49 txt = tok.get_name() 50 mbox = mbox.choose_relativity(origin, relativize) 51 txt = txt.choose_relativity(origin, relativize) 52 tok.get_eol() 53 return cls(rdclass, rdtype, mbox, txt)54 58 62 63 @classmethod65 (mbox, cused) = dns.name.from_wire(wire[: current + rdlen], 66 current) 67 current += cused 68 rdlen -= cused 69 if rdlen <= 0: 70 raise dns.exception.FormError 71 (txt, cused) = dns.name.from_wire(wire[: current + rdlen], 72 current) 73 if cused != rdlen: 74 raise dns.exception.FormError 75 if origin is not None: 76 mbox = mbox.relativize(origin) 77 txt = txt.relativize(origin) 78 return cls(rdclass, rdtype, mbox, txt)7981 self.mbox = self.mbox.choose_relativity(origin, relativize) 82 self.txt = self.txt.choose_relativity(origin, relativize)
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Dec 8 10:59:56 2018 | http://epydoc.sourceforge.net |