%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib/python2.7/site-packages/dns/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyc

�
�ac@s�dZdefd��YZdefd��YZdefd��YZdefd��YZd	efd
��YZdefd��YZd
S(s�Common DNS Exceptions.

Dnspython modules may also define their own exceptions, which will
always be subclasses of ``DNSException``.
tDNSExceptioncBsPeZdZdZe�ZdZd�Zd�Z	d�Z
d�Zd�ZRS(s�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.
    cOs�|j||�|r:|j|�|_t|�|_nt�|_|jdkrd|j|_n|r�tt	|�j
|�ntt	|�j
|j�dS(N(t
_check_paramst
_check_kwargstkwargststrtmsgtdicttNonet__doc__tsuperRt__init__(tselftargsR((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyR
3scOs7|s|r3t|�t|�ks3td��ndS(ssOld exceptions supported only args and not kwargs.

        For sanity we do not allow to mix old and new behavior.s=keyword arguments are mutually exclusive with positional argsN(tbooltAssertionError(RRR((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyRBscKs;|r7t|j��|jks7td|j��n|S(Ns-following set of keyword args is required: %s(tsettkeystsupp_kwargsR(RR((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyRJs
cKs�i}x�|j�D]t\}}t|ttf�r}ttt|��||<t||�dkr�||j�||<q�q|||<qW|S(s�Format kwargs before printing them.

        Resulting dictionary has to have keys necessary for str.format call
        on fmt class variable.
        i(titemst
isinstancetlistRtmapRtlentpop(RRtfmtargstkwtdata((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyt_fmt_kwargsQscCsK|jr4|jr4|j|j�}|jj|�Stt|�j�SdS(N(RtfmtRtformatR	Rt__str__(RR((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyRcsN(
t__name__t
__module__RRRRRRR
RRRR(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyRs					t	FormErrorcBseZdZRS(sDNS message is malformed.(RR R(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyR!mstSyntaxErrorcBseZdZRS(sText input is malformed.(RR R(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyR"qst
UnexpectedEndcBseZdZRS(sText input ended unexpectedly.(RR R(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyR#ustTooBigcBseZdZRS(sThe DNS message is too big.(RR R(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyR$ystTimeoutcBseZdZdhZdZRS(sThe DNS operation timed out.ttimeouts3The DNS operation timed out after {timeout} seconds(RR RRR(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyR%}s	N(Rt	ExceptionRR!R"R#R$R%(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/exception.pyt<module>sU

Zerion Mini Shell 1.0