
    -	                     `    S r SSKrSSKJr   " S S\R
                  R                  5      rS rg)zDNS TTL conversion.    N   )longc                       \ rS rSrSrSrg)BadTTL   z!DNS TTL value is not well-formed. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       lib/third_party/dns/ttl.pyr   r      s    +r   r   c                    U R                  5       (       a  [        U 5      nOU S   R                  5       (       d  [        e[        S5      n[        S5      nU  H  nUR                  5       (       a  US-  nU[        U5      -  nM-  UR                  5       nUS:X  a  X[        S5      -  -  nO^US:X  a  X[        S5      -  -  nOGUS:X  a  X[        S5      -  -  nO0US	:X  a  X[        S
5      -  -  nOUS:X  a  X-  nO[        SU-  5      eSnM     US:X  d  [        S5      eU[        S5      :  d  U[        S5      :  a  [        S5      eU$ )zConvert the text form of a TTL to an integer.

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

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

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

Returns an ``int``.
r   
   wi:	 diQ hi  m<   szunknown unit '%s'ztrailing integeriz0TTL should be between 0 and 2^31 - 1 (inclusive))isdigitr   r   lower)texttotalcurrentcs       r   	from_textr      s9    ||~~T
Aw  LQq'Ayy{{247"GGI8tF|33E#XtE{22E#XtDz11E#XtBx//E#X$E !4q!899% & !|+,,tAw%$z"22GHHLr   )	r   dns.exceptiondns_compatr   	exceptionSyntaxErrorr   r   r   r   r   <module>r%      s+   $   ,S]]&& ,*r   