%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/ttl.cpython-312.pyc

�

5��e����dZddlmZddlZdZGd�dejj�Zde	de
fd	�Zd
ee
e	fde
fd�Zy)zDNS TTL conversion.�)�UnionNl��c��eZdZdZy)�BadTTLz!DNS TTL value is not well-formed.N)�__name__�
__module__�__qualname__�__doc__���)/usr/lib/python3/dist-packages/dns/ttl.pyrr s��+rr�text�returnc��|j�rt|�}n�t|�dk(rt�d}d}d}|D]�}|j�r|dz}|t|�z
}d}�)|rt�|j	�}|dk(r	||dzz
}nC|dk(r	||dzz
}n5|d	k(r	||d
zz
}n'|dk(r	||dzz
}n|d
k(r||z
}ntd|z��d}d}��|dk(std��|dks	|t
kDrtd��|S)z�Convert the text form of a TTL to an integer.

    The BIND 8 units syntax for TTLs (e.g. '1w6d4h3m10s') is supported.

    *text*, a ``str``, the textual TTL.

    Raises ``dns.ttl.BadTTL`` if the TTL is not well-formed.

    Returns an ``int``.
    rT�
F�wi�:	�di�Q�hi�m�<�szunknown unit '%s'ztrailing integerz1TTL should be between 0 and 2**32 - 1 (inclusive))�isdigit�int�lenr�lower�MAX_TTL)r
�total�current�
need_digit�cs     r�	from_textr $s0���|�|�~��D�	��	�T��a���������
��	"�A��y�y�{��2�
���3�q�6�!��"�
�� �L��G�G�I����8��W�v�-�-�E��#�X��W�u�_�,�E��#�X��W�t�^�+�E��#�X��W�r�\�)�E��#�X��W�$�E� �!4�q�!8�9�9���!�
�-	"�.�!�|��+�,�,��q�y�E�G�O��H�I�I��Lr�valuec��t|t�r|St|t�rtjj|�St
d��)Nzcannot convert value to TTL)�
isinstancer�str�dns�ttlr �
ValueError)r!s r�maker(Vs<���%�����	�E�3�	��w�w� � ��'�'��6�7�7r)
r	�typingr�
dns.exceptionr%r�	exception�SyntaxErrorrr$rr r(r
rr�<module>r-s\��$�����,�S�]�]�
&�
&�,�/�C�/�C�/�d8��c�3�h��8�C�8r

Zerion Mini Shell 1.0