AlkantarClanX12
Current Path : /usr/lib/python3.6/site-packages/dns/__pycache__/ |
Current File : //usr/lib/python3.6/site-packages/dns/__pycache__/rdataclass.cpython-36.pyc |
3 �b�W� � @ s� d Z ddlZddlZdZdZdZdZdZdZ eeeeee d�Z ed d � e j� D ��Z e jeeed�� ede diZejd ej�ZG dd� dejj�Zdd� Zdd� Zdd� ZdS )ak 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: dict� N� � � � � )� RESERVED0�IN�CH�HS�NONE�ANYc c s | ]\}}||fV qd S )N� )�.0�x�yr r � /usr/lib/python3.6/rdataclass.py� <genexpr>2 s r )ZINTERNETZCHAOSZHESIODTzCLASS([0-9]+)$c @ s e Zd ZdZdS )�UnknownRdataclasszA DNS class is unknown.N)�__name__� __module__�__qualname__�__doc__r r r r r E s r c C sV t j| j� �}|dkrRtj| �}|dkr,t�t|jd��}|dk sJ|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 Nr r i�� z'class must be between >= 0 and <= 65535) �_by_text�get�upper�_unknown_class_pattern�matchr �int�group� ValueError)�text�valuer r r r � from_textJ s r"