Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
idna / lib / python2.7 / site-packages / eventlet / support / dns / exception.pyc
Size: Mime:
ó
 ‹EYc@sŽdZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZd	efd
„ƒYZdefd„ƒYZd
S(sCommon DNS Exceptions.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 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.
    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((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR
.s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((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR=scKs;|r7t|jƒƒ|jks7td|jƒ‚n|S(Ns-following set of keyword args is required: %s(tsettkeystsupp_kwargsR(RR((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyREs
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((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyt_fmt_kwargsLscCsK|jr4|jr4|j|j}|jj|Stt|ƒjƒSdS(N(RtfmtRtformatR	Rt__str__(RR((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR^sN(
t__name__t
__module__RRRRRRR
RRRR(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyRs					t	FormErrorcBseZdZRS(sDNS message is malformed.(RR R(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR!hstSyntaxErrorcBseZdZRS(sText input is malformed.(RR R(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR"mst
UnexpectedEndcBseZdZRS(sText input ended unexpectedly.(RR R(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR#rstTooBigcBseZdZRS(sThe DNS message is too big.(RR R(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR$wstTimeoutcBs#eZdZedgƒZdZRS(sThe DNS operation timed out.ttimeouts3The DNS operation timed out after {timeout} seconds(RR RRRR(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyR%|sN(Rt	ExceptionRR!R"R#R$R%(((sS/home/tvault/.virtenv/lib/python2.7/site-packages/eventlet/support/dns/exception.pyt<module>sU