
    ui
                     ^    S r SSKrSr " S S\R                  R
                  5      rS rS rg)zDNS TTL conversion.    Nic                       \ 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       >/home/kodi/.kodi/addons/script.module.dnspython/lib/dns/ttl.pyr   r      s    +r   r   c                 $   U R                  5       (       a  [        U 5      nO[        U 5      S:X  a  [        eSnSnSnU  H  nUR                  5       (       a  US-  nU[        U5      -  nSnM/  U(       a  [        eUR	                  5       nUS:X  a  XS-  -  nOCUS:X  a  XS-  -  nO5US	:X  a  XS
-  -  nO'US:X  a  XS-  -  nOUS:X  a  X-  nO[        SU-  5      eSnSnM     US:X  d  [        S5      eUS:  d
  U[
        :  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 ``str``, the textual TTL.

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

Returns an ``int``.
r   T
   Fwi:	 diQ hi  m<   szunknown unit '%s'ztrailing integerz0TTL should be between 0 and 2^31 - 1 (inclusive))isdigitintlenr   lowerMAX_TTL)texttotalcurrent
need_digitcs        r   	from_textr!      s%    ||~~D		Ta
Ayy{{23q6!"
 LGGI8v--E#Xu_,E#Xt^+E#Xr\)E#X$E !4q!899!
- . !|+,,qyEGOGHHLr   c                     [        U [        5      (       a  U $ [        U [        5      (       a  [        R                  R                  U 5      $ [        S5      e)Nzcannot convert value to TTL)
isinstancer   strdnsttlr!   
ValueError)values    r   maker)   N   sB    %	E3		ww  ''677r   )	r   dns.exceptionr%   r   	exceptionSyntaxErrorr   r!   r)   r   r   r   <module>r-      s3   $  
,S]]&& ,/d8r   