a
Me @ s\ d Z ddlmZ ddlZdZG dd dejjZe e
ddd Zee
e f e
d
ddZdS )
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 )textreturnc C s | rt| }nt| dkr$tnd}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|dkstd|dk s|tkrtd|S )zConvert 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
Fwi: diQ hi m<