Hacked By AnonymousFox

Current Path : /usr/lib/python3.6/site-packages/dns/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/dns/__pycache__/rdataclass.cpython-36.pyc

3

�b�W��@s�dZddlZddlZdZdZdZdZdZdZ	eeeeee	d�Z
ed	d
�e
j�D��Z
e
jeeed��ede	diZejd
ej�ZGdd�dejj�Zdd�Zdd�Zdd�ZdS)akDNS 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: dict�N�����)�	RESERVED0�IN�CH�HS�NONE�ANYccs|]\}}||fVqdS)N�)�.0�x�yr
r
� /usr/lib/python3.6/rdataclass.py�	<genexpr>2sr)ZINTERNETZCHAOSZHESIODTzCLASS([0-9]+)$c@seZdZdZdS)�UnknownRdataclasszA DNS class is unknown.N)�__name__�
__module__�__qualname__�__doc__r
r
r
rrEsrcCsVtj|j��}|dkrRtj|�}|dkr,t�t|jd��}|dksJ|dkrRtd��|S)z�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
    Nrri��z'class must be between >= 0 and <= 65535)	�_by_text�get�upper�_unknown_class_pattern�matchr�int�group�
ValueError)�text�valuerr
r
r�	from_textJs	
r"cCs:|dks|dkrtd��tj|�}|dkr6dt|�}|S)z�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
    ri��z'class must be between >= 0 and <= 65535NZCLASS)r�	_by_valuer�repr)r!r r
r
r�to_text^s
r%cCs|tkrdSdS)zmTrue if the class is a metaclass.
    @param rdclass: the rdata class
    @type rdclass: int
    @rtype: boolTF)�_metaclasses)Zrdclassr
r
r�is_metaclassnsr')r�reZ
dns.exceptionZdnsrrr	r
rrr�dict�itemsr#�updater&�compile�IrZ	exceptionZDNSExceptionrr"r%r'r
r
r
r�<module>s4


Hacked By AnonymousFox1.0, Coded By AnonymousFox