<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
bW                 @   s8   d Z ddlZddlmZ G dd dejjZdd ZdS )	zDNS TTL conversion.    N   )longc               @   s   e Zd ZdZdS )BadTTLz!DNS TTL value is not well-formed.N)__name__
__module____qualname____doc__ r	   r	   /usr/lib/python3.6/ttl.pyr      s   r   c             C   s*  | j  rt| }n| d j  s"ttd}td}x| D ]}|j  rZ|d9 }|t|7 }q8|j }|dkr|||td 7 }nl|dkr||td 7 }nR|dkr||td 7 }n8|d	kr||td
 7 }n|dkr||7 }ntd| d}q8W |dkstd|tdk s|tdkr&td|S )zConvert the text form of a TTL to an integer.

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

    @param text: the textual TTL
    @type text: string
    @raises dns.ttl.BadTTL: the TTL is not well-formed
    @rtype: 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)textZtotalZcurrentcr	   r	   r
   	from_text   s8    



r   )	r   Zdns.exceptionZdnsZ_compatr   Z	exceptionSyntaxErrorr   r   r	   r	   r	   r
   <module>   s   