PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` 3 dW@shdZGdddeZGdddeZGdddeZGdddeZGd d d eZGd d d eZd S)zCommon DNS Exceptions.csReZdZdZdZeZdZfddZddZ ddZ d d Z fd d Z Z S) DNSExceptionaAbstract 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 standard Python Exception class as before and all *args are printed by 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 has to be empty and all kwargs has to exactly match set in class variable self.supp_kwargs. All kwargs are stored inside self.kwargs and used in new __str__ implementation to construct formatted message based on self.fmt string. In the simplest case it is enough to override supp_kwargs and fmt class variables to get nice parametrized messages. Ncsp|j|||r*|jf||_t||_nt|_|jdkrD|j|_|rZtt|j |ntt|j |jdS)N) _check_params _check_kwargskwargsstrmsgdict__doc__superr__init__)selfargsr) __class__/usr/lib/python3.6/exception.pyr .s   zDNSException.__init__cOs |s|rdS)zsOld exceptions supported only args and not kwargs. For sanity we do not allow to mix old and new behavior.Nr)r r rrrrr=szDNSException._check_paramscKs|r|S)Nr)r rrrrrEszDNSException._check_kwargscKshi}x^|jD]R\}}t|ttfrXttt|||<t||dkr`||j||<q|||<qW|S)zFormat kwargs before printing them. Resulting dictionary has to have keys necessary for str.format call on fmt class variable. )items isinstancelistsetmaprlenpop)r rfmtargskwdatarrr _fmt_kwargsLs zDNSException._fmt_kwargscs:|jr(|jr(|jf|j}|jjf|Stt|jSdS)N)rfmtrformatr r__str__)r r)r rrr^s zDNSException.__str__)__name__ __module__ __qualname__rrr supp_kwargsrr rrrr __classcell__rr)r rrs rc@seZdZdZdS) FormErrorzDNS message is malformed.N)rr r!rrrrrr$hsr$c@seZdZdZdS) SyntaxErrorzText input is malformed.N)rr r!rrrrrr%msr%c@seZdZdZdS) UnexpectedEndzText input ended unexpectedly.N)rr r!rrrrrr&rsr&c@seZdZdZdS)TooBigzThe DNS message is too big.N)rr r!rrrrrr'wsr'c@seZdZdZedgZdZdS)TimeoutzThe DNS operation timed out.Ztimeoutz3The DNS operation timed out after {timeout} secondsN)rr r!rrr"rrrrrr(|s r(N)r Exceptionrr$r%r&r'r(rrrrs U