ó
    0/¡j0  ã                   ó  • S r SSKJr   " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\
5      r " S S\5      r " S S\5      r " S S5      rg)z…Common DNS Exceptions.

Dnspython modules may also define their own exceptions, which will
always be subclasses of ``DNSException``.
é    )ÚSetc                   ó’   ^ • \ rS rSr% SrSr\S-  \S'   \" 5       r	\
\   \S'   Sr\S-  \S'   U 4S jrS rS	 rS
 rU 4S jrSrU =r$ )ÚDNSExceptioné   aµ  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                 ó>  >• U R                   " U0 UD6  U(       a(  U R                  " S0 UD6U l        [        U 5      U l        O[        5       U l        U R                  c  U R                  U l        U(       a  [        TU ]   " U6   g [        TU ]!  U R                  5        g ©N© )	Ú_check_paramsÚ_check_kwargsÚkwargsÚstrr   ÚdictÚ__doc__ÚsuperÚ__init__©ÚselfÚargsr   Ú	__class__s      €Úf/var/www/html/health-monitoring.indevconsultancy.in/venv/lib/python3.13/site-packages/dns/exception.pyr   ÚDNSException.__init__7   sx   ø€ Ø×Ò˜DÐ+ FÒ+Þà×,Ò,Ñ6¨vÑ6ˆDŒKÜ˜4“yˆD�Hä›&ˆDŒKØ�8‰8Ñà—|‘|ˆDŒHÞÜ‰GÒ˜dÒ#ä‰GÑ˜TŸX™XÕ&ó    c                 ó`   • U(       d  U(       a   [        U5      [        U5      :w  d   S5       egg)zkOld 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   ÚDNSException._check_paramsG   s8   € ö –6Ü˜“:¤Øó"ó ð OàNóOñ ð r   c                 óŠ   • U(       a;  [        UR                  5       5      U R                  :X  d   SU R                   35       eU$ )Nz+following set of keyword args is required: )ÚsetÚkeysr   )r   r   s     r   r   ÚDNSException._check_kwargsP   sC   € Þä�F—K‘K“MÓ" d×&6Ñ&6Ó6ðPà<¸T×=MÑ=MÐ<NÐOóPØ6àˆr   c                 ó  • 0 nUR                  5        Hi  u  p4[        U[        [        -  5      (       aD  [        [	        [
        U5      5      X#'   [        X#   5      S:X  a  X#   R                  5       X#'   Mc  Me  XBU'   Mk     U$ )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_kwargsÚDNSException._fmt_kwargsW   sr   € ð ˆØŸ™ž‰HˆBÜ˜$¤¤s¡
×+Ñ+ä"¤3¤s¨D£>Ó2�‘Ü�w‘{Ó# qÓ(à")¡+§/¡/Ó"3�G“Kñ )ð #˜“ñ 'ð ˆr   c                 óÔ   >• U R                   (       aI  U R                  (       a8  U R                  " S0 U R                   D6nU R                  R                  " S0 UD6$ [        TU ]  5       $ r   )r   r	   r.   Úformatr   Ú__str__)r   r+   r   s     €r   r2   ÚDNSException.__str__i   sL   ø€ Ø�;�;˜4Ÿ8Ÿ8à×&Ò&Ñ5¨¯©Ñ5ˆGØ—8‘8—?’?Ñ- WÑ-Ð-ô ‘7‘?Ó$Ð$r   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r   Ú__annotations__r    r   r   r	   r   r   r   r.   r2   Ú__static_attributes__Ú__classcell__©r   s   @r   r   r      sU   ø‡ ñð, €Cˆˆt‰ÓÙ›E€K��S‘Ó!Ø€Cˆˆt‰Óõ'ò Oòò÷$%ó %r   r   c                   ó   • \ rS rSrSrSrg)Ú	FormErrorés   zDNS message is malformed.r   N©r4   r5   r6   r7   r   r9   r   r   r   r=   r=   s   s   † Ü#r   r=   c                   ó   • \ rS rSrSrSrg)ÚSyntaxErroréw   zText input is malformed.r   Nr?   r   r   r   rA   rA   w   ó   † Ü"r   rA   c                   ó   • \ rS rSrSrSrg)ÚUnexpectedEndé{   zText input ended unexpectedly.r   Nr?   r   r   r   rE   rE   {   s   † Ü(r   rE   c                   ó   • \ rS rSrSrSrg)ÚTooBigé   zThe DNS message is too big.r   Nr?   r   r   r   rH   rH      s   † Ü%r   rH   c                   ó6   ^ • \ rS rSrSrS1rSrU 4S jrSrU =r	$ )ÚTimeoutéƒ   zThe DNS operation timed out.Útimeoutz7The DNS operation timed out after {timeout:.3f} secondsc                 ó&   >• [         TU ]  " U0 UD6  g ©N)r   r   r   s      €r   r   ÚTimeout.__init__‹   s   ø€ Ü‰Ò˜$Ð) &Ó)r   r   )
r4   r5   r6   r7   r   r   r	   r   r9   r:   r;   s   @r   rK   rK   ƒ   s   ø† Ù&à�+€KØ
C€C÷*ó *r   rK   c                   ó   • \ rS rSrSrSrg)ÚUnsupportedAlgorithmé�   z&The DNSSEC algorithm is not supported.r   Nr?   r   r   r   rR   rR   �   s   † Ü0r   rR   c                   ó   • \ rS rSrSrSrg)ÚAlgorithmKeyMismatché“   z=The DNSSEC algorithm is not supported for the given key type.r   Nr?   r   r   r   rU   rU   “   s   † ÜGr   rU   c                   ó   • \ rS rSrSrSrg)ÚValidationFailureé—   z The DNSSEC signature is invalid.r   Nr?   r   r   r   rX   rX   —   s   † Ü*r   rX   c                   ó   • \ rS rSrSrSrg)ÚDeniedByPolicyé›   zDenied by DNSSEC policy.r   Nr?   r   r   r   r[   r[   ›   rC   r   r[   c                   ó&   • \ rS rSrS rS rS rSrg)ÚExceptionWrapperéŸ   c                 ó   • Xl         g rO   ©Úexception_class)r   rb   s     r   r   ÚExceptionWrapper.__init__    s   € Ø.Õr   c                 ó   • U $ rO   r   )r   s    r   Ú	__enter__ÚExceptionWrapper.__enter__£   s   € Øˆr   c                 ót   • Ub5  [        X R                  5      (       d  U R                  [        U5      5      Ueg)NF)r&   rb   r   )r   Úexc_typeÚexc_valÚexc_tbs       r   Ú__exit__ÚExceptionWrapper.__exit__¦   s2   € ØÑ¬
°7×<PÑ<P×(QÑ(QØ×&Ñ&¤s¨7£|Ó4¸'ÐAØr   ra   N)r4   r5   r6   r7   r   re   rk   r9   r   r   r   r^   r^   Ÿ   s   † ò/òõr   r^   N)r   Útypingr   Ú	Exceptionr   r=   rA   rE   rH   rK   rR   rU   rX   r[   r^   r   r   r   Ú<module>ro      s—   ðñ$õ ôT%�9ô T%ôn$�ô $ô#�,ô #ô)�Kô )ô&ˆ\ô &ô	*ˆlô 	*ô1˜<ô 1ôHÐ/ô Hô+˜ô +ô#�\ô #÷
ò 
r   