+
    ni0                        R t ^ RIHt  ! R R]4      t ! R R]4      t ! R R]4      t ! R R	]4      t ! R
 R]4      t ! R R]4      t	 ! R R]4      t
 ! R R]
4      t ! R R]4      t ! R R]4      t ! R R4      tR# )zCommon DNS Exceptions.

Dnspython modules may also define their own exceptions, which will
always be subclasses of ``DNSException``.
)Setc                   v   a a ] tR t^t oRtRt]! 4       tRtV 3R lt	R t
R tR tV 3R ltV3R ltR	tVtV ;t# )
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.
Nc                J  < V P                   ! V/ VB  V'       d)   V P                  ! R/ VB V n        \        V 4      V n        M\        4       V n        V P                  f   V P                  V n        V'       d   \        SV `   ! V!   R # \        SV `!  V P                  4       R # N )	_check_params_check_kwargskwargsstrmsgdict__doc__super__init__selfargsr
   	__class__s   &*,gC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\dns/exception.pyr   DNSException.__init__7   sx    D+F+,,6v6DK4yDH&DK88||DHGd#GTXX&    c                j    V'       g	   V'       d#   \        V4      \        V4      8w  g   Q R4       hR# R# )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                    V'       d=   \        VP                  4       4      V P                  8X  g   Q R V P                   24       hV# )z+following set of keyword args is required: )setkeyssupp_kwargs)r   r
   s   &,r   r	   DNSException._check_kwargsP   sC    FKKM"d&6&66P<T=M=M<NOP6r   c                    / pVP                  4        Fw  w  r4\        V\        \        ,          4      '       dN   \        \	        \
        V4      4      W#&   \        W#,          4      ^8X  d   W#,          P                  4       W#&   Kq  Ks  WBV&   Ky  	  V# )zFormat 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     HB$s
++"3sD>2w{#q(")+//"3GK ) # ' r   c                   < V P                   '       dK   V P                  '       d9   V P                  ! R/ V P                   B pV P                  P                  ! R/ VB # \        SV `  4       # r   )r
   fmtr*   formatr   __str__)r   r'   r   s   & r   r/   DNSException.__str__i   sP    ;;;4888&&55G88??-W-- 7?$$r   c                j   < V ^8  d   Qh/ S[ R,          ;R&   S[S[ ,          ;R&   S[ R,          ;R&   # )   Nr   r   r-   )r   r   )r.   __classdict__s   "r   __annotate__DNSException.__annotate__   s8     . 
t/ 0 S!1 2 
t3 r   )r
   r   )__name__
__module____qualname____firstlineno__r   r   r   r   r-   r   r   r	   r*   r/   __annotate_func____static_attributes____classdictcell____classcell__r   r3   s   @@r   r   r      s?     , CEKC' O$%[  r   r   c                       ] tR t^stRtRtR# )	FormErrorzDNS message is malformed.r   Nr6   r7   r8   r9   r   r;   r   r   r   r@   r@   s   s    #r   r@   c                       ] tR t^wtRtRtR# )SyntaxErrorzText input is malformed.r   NrA   r   r   r   rC   rC   w       "r   rC   c                       ] tR t^{tRtRtR# )UnexpectedEndzText input ended unexpectedly.r   NrA   r   r   r   rF   rF   {   s    (r   rF   c                       ] tR t^tRtRtR# )TooBigzThe DNS message is too big.r   NrA   r   r   r   rH   rH      s    %r   rH   c                   @   a a ] tR t^t oRtR0tRtV 3R ltRtVt	V ;t
# )TimeoutzThe DNS operation timed out.timeoutz7The DNS operation timed out after {timeout:.3f} secondsc                (   < \         SV `  ! V/ VB  R # N)r   r   r   s   &*,r   r   Timeout.__init__   s    $)&)r   r   )r6   r7   r8   r9   r   r   r-   r   r;   r<   r=   r>   s   @@r   rJ   rJ      s     &+K
CC* *r   rJ   c                       ] tR t^tRtRtR# )UnsupportedAlgorithmz&The DNSSEC algorithm is not supported.r   NrA   r   r   r   rP   rP      s    0r   rP   c                       ] tR t^tRtRtR# )AlgorithmKeyMismatchz=The DNSSEC algorithm is not supported for the given key type.r   NrA   r   r   r   rR   rR      s    Gr   rR   c                       ] tR t^tRtRtR# )ValidationFailurez The DNSSEC signature is invalid.r   NrA   r   r   r   rT   rT      s    *r   rT   c                       ] tR t^tRtRtR# )DeniedByPolicyzDenied by DNSSEC policy.r   NrA   r   r   r   rV   rV      rD   r   rV   c                   2   a  ] tR t^t o R tR tR tRtV tR# )ExceptionWrapperc                    Wn         R # rM   exception_class)r   r[   s   &&r   r   ExceptionWrapper.__init__   s    .r   c                    V # rM   r   )r   s   &r   	__enter__ExceptionWrapper.__enter__   s    r   c                z    Ve7   \        W P                  4      '       g   V P                  \        V4      4      VhR# )NF)r"   r[   r   )r   exc_typeexc_valexc_tbs   &&&&r   __exit__ExceptionWrapper.__exit__   s2    
7<P<P(Q(Q&&s7|4'Ar   rZ   N)	r6   r7   r8   r9   r   r^   rd   r;   r<   )r3   s   @r   rX   rX      s     / r   rX   N)r   typingr   	Exceptionr   r@   rC   rF   rH   rJ   rP   rR   rT   rV   rX   r   r   r   <module>rh      s   $ T%9 T%n$ $#, #)K )&\ &	*l 	*1< 1H/ H+ +#\ #
 
r   