File: //usr/local/ssl/lib/python2.4/site-packages/dns/rdataclass.pyc
mň
!`Nc @ sA d Z d k Z d k Z d Z d Z d Z d Z d Z d Z h d e <d e <d
e <d e <d e <d
e <Z
e g Z e
i
D] \ Z Z e e e f q [ Z e
i h d e <d e <d e < h e e <e e <Z e i d e i Z d e i i f d YZ d Z d Z d Z d S( sk DNS Rdata Classes.
@var _by_text: The rdata class textual name to value mapping
@type _by_text: dict
@var _by_value: The rdata class value to textual name mapping
@type _by_value: dict
@var _metaclasses: If an rdataclass is a metaclass, there will be a mapping
whose key is the rdatatype value and whose value is True in this dictionary.
@type _metaclasses: dictNi i i i iţ i˙ t RESERVED0t INt CHt HSt NONEt ANYt INTERNETt CHAOSt HESIODs CLASS([0-9]+)$t UnknownRdataclassc B s t Z d Z RS( s Raised when a class is unknown.( t __name__t
__module__t __doc__( ( ( t2 /usr/lib/python2.4/site-packages/dns/rdataclass.pyR D s c C s t i | i } | d j oi t i | } | d j o
t n t | i
d } | d j p
| d j o t d q n | S( sú Convert text into a DNS rdata class value.
@param text: the text
@type text: string
@rtype: int
@raises dns.rdataclass.UnknownRdataclass: the class is unknown
@raises ValueError: the rdata class value is not >= 0 and <= 65535
i i i˙˙ s' class must be between >= 0 and <= 65535N( t _by_textt gett textt uppert valuet Nonet _unknown_class_patternt matchR t intt groupt
ValueError( R R R ( ( R
t from_textH s
c C sY | d j p
| d j o t d n t i | } | d j o d |
} n | S( sž Convert a DNS rdata class to text.
@param value: the rdata class value
@type value: int
@rtype: string
@raises ValueError: the rdata class value is not >= 0 and <= 65535
i i˙˙ s' class must be between >= 0 and <= 65535t CLASSN( R R t _by_valueR R R ( R R ( ( R
t to_text[ s
c C s t i | o t Sn t S( sm True if the class is a metaclass.
@param rdclass: the rdata class
@type rdclass: int
@rtype: boolN( t _metaclassest has_keyt rdclasst Truet False( R ( ( R
t is_metaclassj s ( R t ret
dns.exceptiont dnsR R R R R R R t dictt _[1]t iteritemst xt yR t updateR R t compilet IR t exceptiont DNSExceptionR R R R"