a
àMÒe£ ã @ s\ d Z ddlmZ ddlZdZG dd„ dejjƒZe e
dœdd „Zee
e f e
d
œdd„ZdS )
zDNS TTL conversion.é )ÚUnionNl ÿÿ c @ s e Zd ZdZdS )ÚBadTTLz!DNS TTL value is not well-formed.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r r ú+/usr/lib/python3.9/site-packages/dns/ttl.pyr s r )ÚtextÚreturnc C s | ¡ rt| ƒ}nèt| ƒdkr$t‚nÖd}d}d}| D ]´}| ¡ rZ|d9 }|t|ƒ7 }d}q4|rbt‚| ¡ }|dkr€||d 7 }n`|dkr–||d 7 }nJ|d kr¬||d
7 }n4|dkrÂ||d 7 }n|d
krÔ||7 }ntd| ƒ‚d}d}q4|dksútdƒ‚|dk �s|tk�rtdƒ‚|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``.
r Té
FÚwi€: Údi€Q Úhi Úmé<