§
    Hºi0  ã                   óH  — d Z ddlmZ  G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d	„ d
e¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z	 G d„ de¦  «        Z
 G d„ de
¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d¦  «        ZdS )z…Common DNS Exceptions.

Dnspython modules may also define their own exceptions, which will
always be subclasses of ``DNSException``.
é    )ÚSetc                   ó’   ‡ — e Zd ZU dZdZedz  ed<    e¦   «         Ze	e         ed<   dZ
edz  ed<   ˆ fd„Zd„ Zd„ Zd	„ Zˆ fd
„Zˆ xZS )ÚDNSExceptionaõ  Abstract base class shared by all dnspython exceptions.

    It supports two basic modes of operation:

    a) Old/compatible mode is used if ``__init__`` was called with
    empty *kwargs*.  In compatible mode all *args* are passed
    to the standard Python Exception class as before and all *args* are
    printed by the standard ``__str__`` implementation.  Class variable
    ``msg`` (or doc string if ``msg`` is ``None``) is returned from ``str()``
    if *args* is empty.

    b) New/parametrized mode is used if ``__init__`` was called with
    non-empty *kwargs*.
    In the new mode *args* must be empty and all kwargs must match
    those set in class variable ``supp_kwargs``. All kwargs are stored inside
    ``self.kwargs`` and used in a new ``__str__`` implementation to construct
    a formatted message based on the ``fmt`` class variable, a ``string``.

    In the simplest case it is enough to override the ``supp_kwargs``
    and ``fmt`` class variables to get nice parametrized messages.
    NÚmsgÚsupp_kwargsÚfmtc                 ó@  •—  | j         |i |¤Ž |r' | j        di |¤Ž| _        t          | ¦  «        | _        nt          ¦   «         | _        | j        €| j        | _        |r t          ¦   «         j        |Ž  d S t          ¦   «                              | j        ¦  «         d S ©N© )	Ú_check_paramsÚ_check_kwargsÚkwargsÚstrr   ÚdictÚ__doc__ÚsuperÚ__init__©ÚselfÚargsr   Ú	__class__s      €úR/home/mmwave/public_html/mmwave/venv/lib/python3.11/site-packages/dns/exception.pyr   zDNSException.__init__7   sª   ø€ ØˆÔ˜DÐ+ FÐ+Ð+Ð+Øð 	!à,˜$Ô,Ð6Ð6¨vÐ6Ð6ˆDŒKÝ˜4‘y”yˆDŒHˆHå™&œ&ˆDŒKØŒ8Ðà”|ˆDŒHØð 	'Ø�E‰GŒGÔ˜dÐ#Ð#Ð#Ð#å‰GŒG×Ò˜TœXÑ&Ô&Ð&Ð&Ð&ó    c                 óf   — |s|r,t          |¦  «        t          |¦  «        k    s
J d¦   «         ‚dS dS )zsOld exceptions supported only args and not kwargs.

        For sanity we do not allow to mix old and new behavior.z=keyword arguments are mutually exclusive with positional argsN)Úbool)r   r   r   s      r   r   zDNSException._check_paramsG   sd   € ð ð 	O�6ð 	OÝ˜‘:”:¥Øñ"ô "ò ð ð àNñô ð ð ð ð	Oð 	Or   c                 ó‚   — |r<t          |                     ¦   «         ¦  «        | j        k    sJ d| j        › �¦   «         ‚|S )Nz+following set of keyword args is required: )ÚsetÚkeysr   )r   r   s     r   r   zDNSException._check_kwargsP   sJ   € Øð 	På�F—K’K‘M”MÑ"Ô" dÔ&6Ò6Ð6Ð6ØO¸TÔ=MÐOÐOñ 7Ô6Ð6àˆr   c                 ó:  — i }|                      ¦   «         D ]ƒ\  }}t          |t          t          z  ¦  «        r\t          t	          t
          |¦  «        ¦  «        ||<   t          ||         ¦  «        dk    r||                              ¦   «         ||<   Œ~|||<   Œ„|S )z˜Format kwargs before printing them.

        Resulting dictionary has to have keys necessary for str.format call
        on fmt class variable.
        é   )ÚitemsÚ
isinstanceÚlistr   Úmapr   ÚlenÚpop)r   r   ÚfmtargsÚkwÚdatas        r   Ú_fmt_kwargszDNSException._fmt_kwargsW   s’   € ð ˆØŸš™œð 	#ð 	#‰HˆB�Ý˜$¥¥s¡
Ñ+Ô+ð #å"¥3¥s¨D¡>¤>Ñ2Ô2�˜‘Ý�w˜r”{Ñ#Ô# qÒ(Ð(à")¨"¤+§/¢/Ñ"3Ô"3�G˜B‘Køà"�˜‘�Øˆr   c                 ó¨   •— | j         r+| j        r$ | j        di | j         ¤Ž} | j        j        di |¤ŽS t	          ¦   «                              ¦   «         S r
   )r   r   r*   Úformatr   Ú__str__)r   r'   r   s     €r   r-   zDNSException.__str__i   s`   ø€ ØŒ;ð 	%˜4œ8ð 	%à&�dÔ&Ð5Ð5¨¬Ð5Ð5ˆGØ"�4”8”?Ð-Ð- WÐ-Ð-Ð-õ ‘7”7—?’?Ñ$Ô$Ð$r   )Ú__name__Ú
__module__Ú__qualname__r   r   r   Ú__annotations__r   r   r   r   r   r   r   r*   r-   Ú__classcell__©r   s   @r   r   r      sÑ   ø€ € € € € € ðð ð, €Cˆˆt‰ÐÐÑØ˜C™EœE€K��S”Ð!Ð!Ñ!Ø€Cˆˆt‰ÐÐÑð'ð 'ð 'ð 'ð 'ð Oð Oð Oðð ð ðð ð ð$%ð %ð %ð %ð %ð %ð %ð %ð %r   r   c                   ó   — e Zd ZdZdS )Ú	FormErrorzDNS message is malformed.N©r.   r/   r0   r   r   r   r   r5   r5   s   s   € € € € € Ø#Ð#Ð#Ð#r   r5   c                   ó   — e Zd ZdZdS )ÚSyntaxErrorzText input is malformed.Nr6   r   r   r   r8   r8   w   ó   € € € € € Ø"Ð"Ð"Ð"r   r8   c                   ó   — e Zd ZdZdS )ÚUnexpectedEndzText input ended unexpectedly.Nr6   r   r   r   r;   r;   {   s   € € € € € Ø(Ð(Ð(Ð(r   r;   c                   ó   — e Zd ZdZdS )ÚTooBigzThe DNS message is too big.Nr6   r   r   r   r=   r=      s   € € € € € Ø%Ð%Ð%Ð%r   r=   c                   ó,   ‡ — e Zd ZdZdhZdZˆ fd„Zˆ xZS )ÚTimeoutzThe DNS operation timed out.Útimeoutz7The DNS operation timed out after {timeout:.3f} secondsc                 ó:   •—  t          ¦   «         j        |i |¤Ž d S ©N)r   r   r   s      €r   r   zTimeout.__init__‹   s%   ø€ Ø�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ð)Ð)r   )r.   r/   r0   r   r   r   r   r2   r3   s   @r   r?   r?   ƒ   sJ   ø€ € € € € Ø&Ð&à�+€KØ
C€Cð*ð *ð *ð *ð *ð *ð *ð *ð *r   r?   c                   ó   — e Zd ZdZdS )ÚUnsupportedAlgorithmz&The DNSSEC algorithm is not supported.Nr6   r   r   r   rD   rD   �   s   € € € € € Ø0Ð0Ð0Ð0r   rD   c                   ó   — e Zd ZdZdS )ÚAlgorithmKeyMismatchz=The DNSSEC algorithm is not supported for the given key type.Nr6   r   r   r   rF   rF   “   s   € € € € € ØGÐGÐGÐGr   rF   c                   ó   — e Zd ZdZdS )ÚValidationFailurez The DNSSEC signature is invalid.Nr6   r   r   r   rH   rH   —   s   € € € € € Ø*Ð*Ð*Ð*r   rH   c                   ó   — e Zd ZdZdS )ÚDeniedByPolicyzDenied by DNSSEC policy.Nr6   r   r   r   rJ   rJ   ›   r9   r   rJ   c                   ó    — e Zd Zd„ Zd„ Zd„ ZdS )ÚExceptionWrapperc                 ó   — || _         d S rB   )Úexception_class)r   rN   s     r   r   zExceptionWrapper.__init__    s   € Ø.ˆÔÐÐr   c                 ó   — | S rB   r   )r   s    r   Ú	__enter__zExceptionWrapper.__enter__£   s   € Øˆr   c                 óz   — |�8t          || j        ¦  «        s#|                      t          |¦  «        ¦  «        |‚dS )NF)r"   rN   r   )r   Úexc_typeÚexc_valÚexc_tbs       r   Ú__exit__zExceptionWrapper.__exit__¦   s;   € ØÐ­
°7¸DÔ<PÑ(QÔ(QÐØ×&Ò&¥s¨7¡|¤|Ñ4Ô4¸'ÐAØˆur   N)r.   r/   r0   r   rP   rU   r   r   r   rL   rL   Ÿ   sA   € € € € € ð/ð /ð /ðð ð ðð ð ð ð r   rL   N)r   Útypingr   Ú	Exceptionr   r5   r8   r;   r=   r?   rD   rF   rH   rJ   rL   r   r   r   ú<module>rX      s  ðð$ð ð Ð Ð Ð Ð Ð ðT%ð T%ð T%ð T%ð T%�9ñ T%ô T%ð T%ðn$ð $ð $ð $ð $�ñ $ô $ð $ð#ð #ð #ð #ð #�,ñ #ô #ð #ð)ð )ð )ð )ð )�Kñ )ô )ð )ð&ð &ð &ð &ð &ˆ\ñ &ô &ð &ð	*ð 	*ð 	*ð 	*ð 	*ˆlñ 	*ô 	*ð 	*ð1ð 1ð 1ð 1ð 1˜<ñ 1ô 1ð 1ðHð Hð Hð Hð HÐ/ñ Hô Hð Hð+ð +ð +ð +ð +˜ñ +ô +ð +ð#ð #ð #ð #ð #�\ñ #ô #ð #ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
r   