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    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / oslo_db / exception.pyc
Size: Mime:
ó
x“EYc@s&dZddlZddlZddlmZddlmZdefd„ƒYZdefd„ƒYZ	d	efd
„ƒYZ
defd„ƒYZd
efd„ƒYZdefd„ƒYZ
defd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZejjedeƒdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd!„ƒYZd"efd#„ƒYZd$efd%„ƒYZd&efd'„ƒYZd(efd)„ƒYZd*efd+„ƒYZd,efd-„ƒYZ d.e!fd/„ƒYZ"dS(0s:DB related custom exceptions.

Custom exceptions intended to determine the causes of specific database
errors. This module provides more generic exceptions than the database-specific
driver libraries, and so users of oslo.db can catch these no matter which
database the application is using. Most of the exceptions are wrappers. Wrapper
exceptions take an original exception as positional argument and keep it for
purposes of deeper debug.

Example::

    try:
        statement(arg)
    except sqlalchemy.exc.OperationalError as e:
        raise DBDuplicateEntry(e)


This is useful to determine more specific error cases further at execution,
when you need to add some extra information to an error message. Wrapper
exceptions takes care about original error message displaying to not to loose
low level cause of an error. All the database api exceptions wrapped into
the specific exceptions provided belove.


Please use only database related custom exceptions with database manipulations
with `try/except` statement. This is required for consistent handling of
database errors.
iÿÿÿÿN(t_(tCausedByExceptiontDBErrorcBseZdZddd„ZRS(s¤Base exception for all custom database exceptions.

    :kwarg inner_exception: an original exception which was wrapped with
        DBError or its subclasses.
    cCs/||_tt|ƒjtj|ƒ|ƒdS(N(tinner_exceptiontsuperRt__init__tsixt	text_type(tselfRtcause((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR=s	N(t__name__t
__module__t__doc__tNoneR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR5stDBDuplicateEntrycBs eZdZdddd„ZRS(sáDuplicate entry at unique column error.

    Raised when made an attempt to write to a unique column the same entry as
    existing one. :attr: `columns` available on an instance of the exception
    and could be used at error handling::

       try:
           instance_type_ref.save()
       except DBDuplicateEntry as e:
           if 'colname' in e.columns:
               # Handle error.

    :kwarg columns: a list of unique columns have been attempted to write a
        duplicate entry.
    :type columns: list
    :kwarg value: a value which has been attempted to write. The value will
        be None, if we can't extract it for a particular database backend. Only
        MySQL and PostgreSQL 9.x are supported right now.
    cCs2|p	g|_||_tt|ƒj|ƒdS(N(tcolumnstvalueRRR(RRRR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRVs	N(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRBstDBConstraintErrorcBseZdZdd„ZRS(sNCheck constraint fails for column error.

    Raised when made an attempt to write to a column a value that does not
    satisfy a CHECK constraint.

    :kwarg table: the table name for which the check fails
    :type table: str
    :kwarg check_name: the table of the check that failed to be satisfied
    :type check_name: str
    cCs,||_||_tt|ƒj|ƒdS(N(ttablet
check_nameRRR(RRRR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRgs		N(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR\s
tDBReferenceErrorcBseZdZdd„ZRS(s^Foreign key violation error.

    :param table: a table name in which the reference is directed.
    :type table: str
    :param constraint: a problematic constraint name.
    :type constraint: str
    :param key: a broken reference key name.
    :type key: str
    :param key_table: a table name which contains the key.
    :type key_table: str
    cCs>||_||_||_||_tt|ƒj|ƒdS(N(Rt
constrainttkeyt	key_tableRRR(RRRRRR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRzs
				N(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRmstDBNonExistentConstraintcBseZdZdd„ZRS(sŽConstraint does not exist.

    :param table: table name
    :type table: str
    :param constraint: constraint name
    :type table: str
    cCs,||_||_tt|ƒj|ƒdS(N(RRRRR(RRRR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRŒs		N(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRƒstDBNonExistentTablecBseZdZdd„ZRS(sMTable does not exist.

    :param table: table name
    :type table: str
    cCs#||_tt|ƒj|ƒdS(N(RRRR(RRR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR™s	N(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR’st
DBDeadlockcBseZdZdd„ZRS(sþDatabase dead lock error.

    Deadlock is a situation that occurs when two or more different database
    sessions have some data locked, and each database session requests a lock
    on the data that another, different, session has already locked.
    cCstt|ƒj|ƒdS(N(RRR(RR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR§sN(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRžstDBInvalidUnicodeParametercBs,eZdZejjd„ƒZd„ZRS(swDatabase unicode error.

    Raised when unicode parameter is passed to a database
    without encoding directive.
    cCs
t|ƒS(N(tstr(R((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pytmessage³scCs tt|ƒjtdƒƒdS(Ns6Invalid Parameter: Encoding directive wasn't provided.(RRRR(R((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRºs(R
RRt
debtcollectortremovalstremoved_propertyRR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR«stDbMigrationErrorcBseZdZdd„ZRS(sjWrapped migration specific exception.

    Raised when migrations couldn't be completed successfully.
    cCstt|ƒj|ƒdS(N(RR!R(RR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRÆsN(R
RRR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR!¿stDBMigrationErrorcBseZdZd„ZRS(sjWrapped migration specific exception.

    Raised when migrations couldn't be completed successfully.
    cCstt|ƒj|ƒdS(N(RR"R(RR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRÐs(R
RRR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR"ÊstreplacementtDBConnectionErrorcBseZdZRS(s[Wrapped connection specific exception.

    Raised when database connection is failed.
    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR$ØstDBDataErrorcBseZdZRS(sšRaised for errors that are due to problems with the processed data.

    E.g. division by zero, numeric value out of range, incorrect data type, etc

    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR%âstInvalidSortKeycBs/eZdZejjd„ƒZdd„ZRS(s8A sort key destined for database query usage is invalid.cCs
t|ƒS(N(R(R((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRíscCs-tt|ƒjtdƒ|ƒ||_dS(Ns Sort key supplied is invalid: %s(RR&RRR(RR((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRôsN(	R
RRRRR RR
R(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR&êstColumnErrorcBseZdZRS(s:Error raised when no column or an invalid column is found.(R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR'ústBackendNotAvailablecBseZdZRS(s`Error raised when a particular database backend is not available

    within a test suite.

    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR(þstRetryRequestcBseZdZd„ZRS(sˆError raised when DB operation needs to be retried.

    That could be intentionally raised by the code without any real DB errors.
    cCs
||_dS(N(t	inner_exc(RR*((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyRs(R
RRR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR)stNoEngineContextEstablishedcBseZdZRS(såError raised for enginefacade attribute access with no context.


    This applies to the ``session`` and ``connection`` attributes
    of a user-defined context and/or RequestContext object, when they
    are accessed *outside* of the scope of an enginefacade decorator
    or context manager.

    The exception is a subclass of AttributeError so that
    normal Python missing attribute behaviors are maintained, such
    as support for ``getattr(context, 'session', None)``.


    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR+stContextNotRequestedErrorcBseZdZRS(s¿Error raised when requesting a not-setup enginefacade attribute.

    This applies to the ``session`` and ``connection`` attributes
    of a user-defined context and/or RequestContext object, when they
    are accessed *within* the scope of an enginefacade decorator
    or context manager, but the context has not requested that
    attribute (e.g. like "with enginefacade.connection.using(context)"
    and "context.session" is requested).

    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR, s
tCantStartEngineErrorcBseZdZRS(s=Error raised when the enginefacade cannot start up correctly.(R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR--stNotSupportedWarningcBseZdZRS(säWarn that an argument or call that was passed is not supported.

    This subclasses Warning so that it can be filtered as a distinct
    category.

    .. seealso::

        https://docs.python.org/2/library/warnings.html

    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR.1s
tOsloDBDeprecationWarningcBseZdZRS(sÕIssued per usage of a deprecated API.

    This subclasses DeprecationWarning so that it can be filtered as a distinct
    category.

    .. seealso::

        https://docs.python.org/2/library/warnings.html

    (R
RR(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyR/>s
(#Rtdebtcollector.removalsRRt
oslo_db._i18nRtoslo_utils.excutilsRRRRRRRRt	ExceptionRR!R"Rt
removed_classR$R%R&R'R(R)tAttributeErrorR+R,R-tWarningR.tDeprecationWarningR/(((sF/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_db/exception.pyt<module>,s6