/usr/lib/python3.6/site-packages/dns/__pycache__
NameSizeModeActions
dnssec.cpython-36.opt-1.pyc108440644editdlrm
dnssec.cpython-36.pyc109150644editdlrm
e164.cpython-36.opt-1.pyc26630644editdlrm
e164.cpython-36.pyc26630644editdlrm
edns.cpython-36.opt-1.pyc44070644editdlrm
edns.cpython-36.pyc44070644editdlrm
entropy.cpython-36.opt-1.pyc32830644editdlrm
entropy.cpython-36.pyc32830644editdlrm
exception.cpython-36.opt-1.pyc36970644editdlrm
exception.cpython-36.pyc39080644editdlrm
flags.cpython-36.opt-1.pyc21700644editdlrm
flags.cpython-36.pyc21700644editdlrm
grange.cpython-36.opt-1.pyc9040644editdlrm
grange.cpython-36.pyc9620644editdlrm
hash.cpython-36.opt-1.pyc4750644editdlrm
hash.cpython-36.pyc4750644editdlrm
inet.cpython-36.opt-1.pyc23160644editdlrm
inet.cpython-36.pyc23160644editdlrm
ipv4.cpython-36.opt-1.pyc13580644editdlrm
ipv4.cpython-36.pyc13580644editdlrm
ipv6.cpython-36.opt-1.pyc29880644editdlrm
ipv6.cpython-36.pyc29880644editdlrm
message.cpython-36.opt-1.pyc326220644editdlrm
message.cpython-36.pyc326220644editdlrm
name.cpython-36.opt-1.pyc271260644editdlrm
name.cpython-36.pyc271260644editdlrm
namedict.cpython-36.opt-1.pyc28550644editdlrm
namedict.cpython-36.pyc28550644editdlrm
node.cpython-36.opt-1.pyc55340644editdlrm
node.cpython-36.pyc55340644editdlrm
opcode.cpython-36.opt-1.pyc20500644editdlrm
opcode.cpython-36.pyc20500644editdlrm
query.cpython-36.opt-1.pyc137480644editdlrm
query.cpython-36.pyc137480644editdlrm
rcode.cpython-36.opt-1.pyc24870644editdlrm
rcode.cpython-36.pyc24870644editdlrm
rdata.cpython-36.opt-1.pyc143550644editdlrm
rdata.cpython-36.pyc143550644editdlrm
rdataclass.cpython-36.opt-1.pyc25080644editdlrm
rdataclass.cpython-36.pyc25080644editdlrm
rdataset.cpython-36.opt-1.pyc95110644editdlrm
rdataset.cpython-36.pyc95500644editdlrm
rdatatype.cpython-36.opt-1.pyc45010644editdlrm
rdatatype.cpython-36.pyc45010644editdlrm
renderer.cpython-36.opt-1.pyc97400644editdlrm
renderer.cpython-36.pyc98270644editdlrm
resolver.cpython-36.opt-1.pyc357760644editdlrm
resolver.cpython-36.pyc357760644editdlrm
reversename.cpython-36.opt-1.pyc25930644editdlrm
reversename.cpython-36.pyc25930644editdlrm
rrset.cpython-36.opt-1.pyc52390644editdlrm
rrset.cpython-36.pyc52390644editdlrm
set.cpython-36.opt-1.pyc79030644editdlrm
set.cpython-36.pyc79030644editdlrm
tokenizer.cpython-36.opt-1.pyc145070644editdlrm
tokenizer.cpython-36.pyc145070644editdlrm
tsig.cpython-36.opt-1.pyc62090644editdlrm
tsig.cpython-36.pyc62090644editdlrm
tsigkeyring.cpython-36.opt-1.pyc10550644editdlrm
tsigkeyring.cpython-36.pyc10550644editdlrm
ttl.cpython-36.opt-1.pyc13200644editdlrm
ttl.cpython-36.pyc13200644editdlrm
update.cpython-36.opt-1.pyc70940644editdlrm
update.cpython-36.pyc70940644editdlrm
version.cpython-36.opt-1.pyc4500644editdlrm
version.cpython-36.pyc4500644editdlrm
wiredata.cpython-36.opt-1.pyc23210644editdlrm
wiredata.cpython-36.pyc23210644editdlrm
zone.cpython-36.opt-1.pyc301370644editdlrm
zone.cpython-36.pyc301370644editdlrm
_compat.cpython-36.opt-1.pyc12990644editdlrm
_compat.cpython-36.pyc12990644editdlrm
__init__.cpython-36.opt-1.pyc5850644editdlrm
__init__.cpython-36.pyc5850644editdlrm
Edit: /usr/lib/python3.6/site-packages/dns/__pycache__/rdataset.cpython-36.pyc (9550B)
3 ¢báW$-ã@s¼dZddlZddlmZddlZddlZddlZddlZddl Zddl Zddl m Z ej jZGdd„dejjƒZGdd „d ejjƒZGd d „d ej jƒZd d „Zdd„Zdd„Zdd„ZdS)zHDNS rdatasets (an rdataset is a set of rdatas of a given type and class)éN)ÚStringIOé)Ú string_typesc@seZdZdZdS)ÚDifferingCoversz~An attempt was made to add a DNS SIG/RRSIG whose covered type is not the same as that of the other rdatas in the rdataset.N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©r r ú/usr/lib/python3.6/rdataset.pyr!src@seZdZdZdS)ÚIncompatibleTypesz?An attempt was made to add DNS RR data of an incompatible type.N)rrrr r r r r r 'sr csºeZdZdZddddgZejjf‡fdd„ Z‡fdd „Z d d „Z d$‡fd d„ Z ‡fdd„Z ‡fdd„Z ‡fdd„Zdd„Zdd„Z‡fdd„Zdd„Zd%dd„Zd&d d!„Zd"d#„Z‡ZS)'ÚRdatasetaÝA DNS rdataset. @ivar rdclass: The class of the rdataset @type rdclass: int @ivar rdtype: The type of the rdataset @type rdtype: int @ivar covers: The covered type. Usually this value is dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG or dns.rdatatype.RRSIG, then the covers value will be the rdata type the SIG/RRSIG covers. The library treats the SIG and RRSIG types as if they were a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA). This makes RRSIGs much easier to work with than if RRSIGs covering different rdata types were aggregated into a single RRSIG rdataset. @type covers: int @ivar ttl: The DNS TTL (Time To Live) value @type ttl: int ÚrdclassÚrdtypeÚcoversÚttlcs*tt|ƒjƒ||_||_||_d|_dS)z©Create a new rdataset of the specified class and type. @see: the description of the class instance variables for the meaning of I{rdclass} and I{rdtype}rN)Úsuperr Ú__init__rrrr)Úselfrrr)Ú __class__r r rCs zRdataset.__init__cs2tt|ƒjƒ}|j|_|j|_|j|_|j|_|S)N)rr Ú_clonerrrr)rÚobj)rr r rOs zRdataset._clonecCs(t|ƒdkr||_n||jkr$||_dS)zàSet the TTL of the rdataset to be the lesser of the set's current TTL or the specified TTL. If the set contains no rdatas, set the TTL to the specified TTL. @param ttl: The TTL @type ttl: intrN)Úlenr)rrr r r Ú update_ttlWs  zRdataset.update_ttlNcs¸|j|jks|j|jkrt‚|dk r.|j|ƒ|jtjjksJ|jtjjkr‚|jƒ}t |ƒdkrt|jtjj krt||_n|j|kr‚t ‚tjj |jƒr¤t |ƒdkr¤|j ƒtt|ƒj|ƒdS)a%Add the specified rdata to the rdataset. If the optional I{ttl} parameter is supplied, then self.update_ttl(ttl) will be called prior to adding the rdata. @param rd: The rdata @type rd: dns.rdata.Rdata object @param ttl: The TTL @type ttl: intNr)rrr rÚdnsÚ rdatatypeZRRSIGZSIGrrÚNONErZ is_singletonÚclearrr Úadd)rÚrdrr)rr r rcs  z Rdataset.addcs |j|jƒtt|ƒj|ƒdS)N)rrrr Ú union_update)rÚother)rr r r ƒs zRdataset.union_updatecs |j|jƒtt|ƒj|ƒdS)N)rrrr Úintersection_update)rr!)rr r r"‡s zRdataset.intersection_updatecs |j|jƒtt|ƒj|ƒdS)z‹Add all rdatas in other to self. @param other: The rdataset from which to update @type other: dns.rdataset.Rdataset objectN)rrrr Úupdate)rr!)rr r r#‹s zRdataset.updatecCsR|jdkrd}ndtjj|jƒd}dtjj|jƒdtjj|jƒ|dS)NrÚú(ú)z)rrrÚto_textÚ rdataclassrr)rZctextr r r Ú__repr__”s zRdataset.__repr__cCs|jƒS)N)r()rr r r Ú__str__œszRdataset.__str__csFt|tƒsdS|j|jks2|j|jks2|j|jkr6dStt|ƒj|ƒS)zTwo rdatasets are equal if they have the same class, type, and covers, and contain the same rdata. @rtype: boolF)Ú isinstancer rrrrÚ__eq__)rr!)rr r r-Ÿs    zRdataset.__eq__cCs |j|ƒ S)N)r-)rr!r r r Ú__ne__¬szRdataset.__ne__Tc KsØ|dk r"|j||ƒ}t|ƒ}d}nd}d}tƒ}|dk r>|} n|j} t|ƒdkrz|jd||tjj| ƒtj j|j ƒfƒnNxL|D]D} |jd|||j tjj| ƒtj j|j ƒ| jf||dœ|—Žfƒq€W|j ƒdd …S) a„Convert the rdataset into DNS master file format. @see: L{dns.name.Name.choose_relativity} for more information on how I{origin} and I{relativize} determine the way names are emitted. Any additional keyword arguments are passed on to the rdata to_text() method. @param name: If name is not None, emit a RRs with I{name} as the owner name. @type name: dns.name.Name object @param origin: The origin for relative names, or None. @type origin: dns.name.Name object @param relativize: True if names should names be relativized @type relativize: boolNr'r$rz %s%s%s %s z%s%s%d %s %s %s )ÚoriginÚ relativizeréÿÿÿÿ) Zchoose_relativityÚstrrrrÚwriterr)r(rrrÚgetvalue) rÚnamer/r0Úoverride_rdclassÚkwZntextZpadÚsrrr r r r(¯s*      zRdataset.to_textc Cs&|dk r|}d}n|j}|jddƒt|ƒdkr`|j|||ƒtjd|j|ddƒ}|j|ƒdS|rxt|ƒ} t j | ƒn|} xœ| D]”} |j|||ƒtjd|j||j dƒ}|j|ƒ|j ƒ} | j|||ƒ|j ƒ} | | dksât ‚|j| dƒtjd| | ƒ}|j|ƒ|jddƒq‚Wt|ƒSdS) a,Convert the rdataset to wire format. @param name: The owner name of the RRset that will be emitted @type name: dns.name.Name object @param file: The file to which the wire format data will be appended @type file: file @param compress: The compression table to use; the default is None. @type compress: dict @param origin: The origin to be appended to any relative names when they are emitted. The default is None. @returns: the number of records emitted @rtype: int NFréz!HHIHriz!H)rÚseekrÚto_wireÚstructÚpackrr3ÚlistÚrandomZshufflerÚtellÚAssertionError) rr5ÚfileÚcompressr/r6Z want_shufflerZstuffÚlrÚstartÚendr r r r;âs8         zRdataset.to_wirecCs&|j|kr"|j|kr"|j|kr"dSdS)zSReturns True if this rdataset matches the specified class, type, and coversTF)rrr)rrrrr r r Úmatchs    zRdataset.match)N)NNTN)NNNT)rrrr Ú __slots__rrrrrrrr r"r#r*r+r-r.r(r;rGÚ __classcell__r r )rr r ,s$        2 /r cCspt|tƒrtjj|ƒ}t|tƒr,tjj|ƒ}t||ƒ}|j|ƒx*|D]"}tjj|j |j |ƒ}|j |ƒqFW|S)z¤Create an rdataset with the specified class, type, and TTL, and with the specified list of rdatas in text format. @rtype: dns.rdataset.Rdataset object ) r,rrr)Ú from_textrr rZrdatarrr)rrrÚ text_rdatasÚrÚtrr r r Úfrom_text_lists       rNcGst||||ƒS)zœCreate an rdataset with the specified class, type, and TTL, and with the specified rdatas in text format. @rtype: dns.rdataset.Rdataset object )rN)rrrrKr r r rJ/srJcCsTt|ƒdkrtdƒ‚d}x6|D].}|dkrBt|j|jƒ}|j|ƒ|j|ƒqW|S)z‹Create an rdataset with the specified TTL, and with the specified list of rdata objects. @rtype: dns.rdataset.Rdataset object rzrdata list must not be emptyN)rÚ ValueErrorr rrrr)rÚrdatasrLrr r r Úfrom_rdata_list9s   rQcGs t||ƒS)zƒCreate an rdataset with the specified TTL, and with the specified rdata objects. @rtype: dns.rdataset.Rdataset object )rQ)rrPr r r Ú from_rdataKsrR)r r?Úiorr<Z dns.exceptionrZ dns.rdatatypeZdns.rdataclassZ dns.rdataZdns.setZ_compatrÚsetÚSetZ SimpleSetZ exceptionZ DNSExceptionrr r rNrJrQrRr r r r Ús$  q