ó
H`¾Tc           @   s  d  Z  d d l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ	 d e	 f d „  ƒ  YZ
 d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e e f d  „  ƒ  YZ d! e f d" „  ƒ  YZ d# e f d$ „  ƒ  YZ d% e f d& „  ƒ  YZ d' e f d( „  ƒ  YZ d) e f d* „  ƒ  YZ d+ e f d, „  ƒ  YZ d Z d- e f d. „  ƒ  YZ d/ e f d0 „  ƒ  YZ d1 e f d2 „  ƒ  YZ d3 e f d4 „  ƒ  YZ d5 e f d6 „  ƒ  YZ  d7 e f d8 „  ƒ  YZ! d9 e f d: „  ƒ  YZ" d; e f d< „  ƒ  YZ# d= e f d> „  ƒ  YZ$ d? e f d@ „  ƒ  YZ% dA e& f dB „  ƒ  YZ' dC e( f dD „  ƒ  YZ) dE e* f dF „  ƒ  YZ+ d S(G   s¿   Exceptions used with SQLAlchemy.

The base exception class is :exc:`.SQLAlchemyError`.  Exceptions which are
raised as a result of DBAPI exceptions are all subclasses of
:exc:`.DBAPIError`.

iÿÿÿÿNt   SQLAlchemyErrorc           B   s   e  Z d  Z RS(   s   Generic error class.(   t   __name__t
   __module__t   __doc__(    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR       s   t   ArgumentErrorc           B   s   e  Z d  Z RS(   s“   Raised when an invalid or conflicting function argument is supplied.

    This error generally corresponds to construction time state errors.

    (   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR      s   t   NoSuchModuleErrorc           B   s   e  Z d  Z RS(   sp   Raised when a dynamically-loaded module (usually a database dialect)
    of a particular name cannot be located.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR      s   t   NoForeignKeysErrorc           B   s   e  Z d  Z RS(   sU   Raised when no foreign keys can be located between two selectables
    during a join.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   $   s   t   AmbiguousForeignKeysErrorc           B   s   e  Z d  Z RS(   sh   Raised when more than one foreign key matching can be located
    between two selectables during a join.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   )   s   t   CircularDependencyErrorc           B   s#   e  Z d  Z d d „ Z d „  Z RS(   s.  Raised by topological sorts when a circular dependency is detected.

    There are two scenarios where this error occurs:

    * In a Session flush operation, if two objects are mutually dependent
      on each other, they can not be inserted or deleted via INSERT or
      DELETE statements alone; an UPDATE will be needed to post-associate
      or pre-deassociate one of the foreign key constrained values.
      The ``post_update`` flag described at :ref:`post_update` can resolve
      this cycle.
    * In a :meth:`.MetaData.create_all`, :meth:`.MetaData.drop_all`,
      :attr:`.MetaData.sorted_tables` operation, two :class:`.ForeignKey`
      or :class:`.ForeignKeyConstraint` objects mutually refer to each
      other.  Apply the ``use_alter=True`` flag to one or both,
      see :ref:`use_alter`.

    c         C   sO   | d  k r# | d | | f 7} n | } t j |  | ƒ | |  _ | |  _ d  S(   Ns    Cycles: %r all edges: %r(   t   NoneR    t   __init__t   cyclest   edges(   t   selft   messageR   R   t   msg(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR
   @   s    	c         C   s&   |  j  d  |  j |  j |  j d f f S(   Ni    (   t	   __class__R	   R   R   t   args(   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyt
   __reduce__I   s    N(   R   R   R   R	   R
   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   .   s   	t   CompileErrorc           B   s   e  Z d  Z RS(   s2   Raised when an error occurs during SQL compilation(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   N   s   t   UnsupportedCompilationErrorc           B   s   e  Z d  Z d „  Z RS(   sd   Raised when an operation is not supported by the given compiler.


    .. versionadded:: 0.8.3

    c         C   s$   t  t |  ƒ j d | | f ƒ d  S(   Ns+   Compiler %r can't render element of type %s(   t   superR   R
   (   R   t   compilert   element_type(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR
   Z   s    (   R   R   R   R
   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   R   s   t   IdentifierErrorc           B   s   e  Z d  Z RS(   s;   Raised when a schema name is beyond the max character limit(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   `   s   t   DisconnectionErrorc           B   s   e  Z d  Z RS(   s™  A disconnect is detected on a raw DB-API connection.

    This error is raised and consumed internally by a connection pool.  It can
    be raised by the :meth:`.PoolEvents.checkout` event so that the host pool
    forces a retry; the exception will be caught three times in a row before
    the pool gives up and raises :class:`~sqlalchemy.exc.InvalidRequestError`
    regarding the connection attempt.

    (   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   d   s   	t   TimeoutErrorc           B   s   e  Z d  Z RS(   s@   Raised when a connection pool times out on getting a connection.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   p   s   t   InvalidRequestErrorc           B   s   e  Z d  Z RS(   sv   SQLAlchemy was asked to do something it can't do.

    This error generally corresponds to runtime state errors.

    (   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   t   s   t   NoInspectionAvailablec           B   s   e  Z d  Z RS(   sa   A subject passed to :func:`sqlalchemy.inspection.inspect` produced
    no context for inspection.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   |   s   t   ResourceClosedErrorc           B   s   e  Z d  Z RS(   sc   An operation was requested from a connection, cursor, or other
    object that's in a closed state.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR      s   t   NoSuchColumnErrorc           B   s   e  Z d  Z RS(   s6   A nonexistent column is requested from a ``RowProxy``.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   †   s   t   NoReferenceErrorc           B   s   e  Z d  Z RS(   sD   Raised by ``ForeignKey`` to indicate a reference cannot be resolved.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   Š   s   t   NoReferencedTableErrorc           B   s    e  Z d  Z d „  Z d „  Z RS(   sQ   Raised by ``ForeignKey`` when the referred ``Table`` cannot be
    located.

    c         C   s   t  j |  | ƒ | |  _ d  S(   N(   R   R
   t
   table_name(   R   R   t   tname(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR
   “   s    c         C   s   |  j  |  j d |  j f f S(   Ni    (   R   R   R!   (   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   —   s    (   R   R   R   R
   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR    Ž   s   	t   NoReferencedColumnErrorc           B   s    e  Z d  Z d „  Z d „  Z RS(   sR   Raised by ``ForeignKey`` when the referred ``Column`` cannot be
    located.

    c         C   s&   t  j |  | ƒ | |  _ | |  _ d  S(   N(   R   R
   R!   t   column_name(   R   R   R"   t   cname(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR
       s    	c         C   s#   |  j  |  j d |  j |  j f f S(   Ni    (   R   R   R!   R$   (   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   ¥   s    (   R   R   R   R
   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR#   ›   s   	t   NoSuchTableErrorc           B   s   e  Z d  Z RS(   s7   Table does not exist or is not visible to a connection.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR&   ª   s   t   UnboundExecutionErrorc           B   s   e  Z d  Z RS(   sA   SQL was attempted without a database connection to execute it on.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR'   ®   s   t   DontWrapMixinc           B   s   e  Z d  Z RS(   s8  A mixin class which, when applied to a user-defined Exception class,
    will not be wrapped inside of :exc:`.StatementError` if the error is
    emitted within the process of executing a statement.

    E.g.::

        from sqlalchemy.exc import DontWrapMixin

        class MyCustomException(Exception, DontWrapMixin):
            pass

        class MySpecialType(TypeDecorator):
            impl = String

            def process_bind_param(self, value, dialect):
                if value == 'invalid':
                    raise MyCustomException("invalid!")

    (   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR(   ²   s   t   StatementErrorc           B   sM   e  Z d  Z d Z d Z d Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z RS(   sv  An error occurred during execution of a SQL statement.

    :class:`StatementError` wraps the exception raised
    during execution, and features :attr:`.statement`
    and :attr:`.params` attributes which supply context regarding
    the specifics of the statement which had an issue.

    The wrapped exception object is available in
    the :attr:`.orig` attribute.

    c         C   s8   t  j |  | ƒ | |  _ | |  _ | |  _ g  |  _ d  S(   N(   R    R
   t	   statementt   paramst   origt   detail(   R   R   R*   R+   R,   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR
   á   s
    			c         C   s   |  j  j | ƒ d  S(   N(   R-   t   append(   R   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyt
   add_detailè   s    c         C   s)   |  j  |  j d |  j |  j |  j f f S(   Ni    (   R   R   R*   R+   R,   (   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   ë   s    c         C   sq   d d l  m } | j |  j d ƒ } d j g  |  j D] } d | ^ q5 t j |  ƒ t |  j	 ƒ t | ƒ g ƒ S(   Niÿÿÿÿ(   t   utili
   t    s   (%s)(
   t   sqlalchemy.sqlR0   t   _repr_paramsR+   t   joinR-   R    t   __str__t   reprR*   (   R   R0   t   params_reprt   det(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR5   ï   s    c         C   s
   |  j  ƒ  S(   N(   R5   (   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyt   __unicode__ú   s    N(   R   R   R   R	   R*   R+   R,   R
   R/   R   R5   R9   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR)   Ë   s   				t
   DBAPIErrorc           B   s5   e  Z d  Z e e d „ ƒ Z d „  Z e d „ Z RS(   s	  Raised when the execution of a database operation fails.

    Wraps exceptions raised by the DB-API underlying the
    database operation.  Driver-specific implementations of the standard
    DB-API exception types are wrapped by matching sub-types of SQLAlchemy's
    :class:`DBAPIError` when possible.  DB-API's ``Error`` type maps to
    :class:`DBAPIError` in SQLAlchemy, otherwise the names are identical.  Note
    that there is no guarantee that different DB-API implementations will
    raise the same exception type for any given error condition.

    :class:`DBAPIError` features :attr:`~.StatementError.statement`
    and :attr:`~.StatementError.params` attributes which supply context
    regarding the specifics of the statement which had an issue, for the
    typical case when the error was raised within the context of
    emitting a SQL statement.

    The wrapped exception object is available in the
    :attr:`~.StatementError.orig` attribute. Its type and properties are
    DB-API implementation specific.

    c   
      C   sì   t  | t t t f ƒ r | S| d  k	 rÙ t  | | ƒ r€ | r€ t j | j | ƒ d j ƒ  } t	 d t
 | ƒ | f | | | ƒ St ƒ  } xM | j j D]< } | j }	 |	 | k r– t | |	 t ƒ r– | |	 }  Pq– q– Wn  |  | | | | ƒ S(   Niÿÿÿÿs   %s (original cause: %s)(   t
   isinstancet   KeyboardInterruptt
   SystemExitR(   R	   t	   tracebackt   format_exception_onlyR   t   stripR)   t   strt   globalst   __mro__R   t
   issubclassR:   (
   t   clsR*   R+   R,   t   dbapi_base_errt   connection_invalidatedR   t   globt   super_t   name(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyt   instance  s     		
c         C   s%   |  j  |  j |  j |  j |  j f f S(   N(   R   R*   R+   R,   RG   (   R   (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR   2  s    c         C   s…   y t  | ƒ } Wn< t t f k
 r, ‚  n# t k
 rN } d t  | ƒ } n Xt j |  d | j j | f | | | ƒ | |  _ d  S(   Ns.   Error in str() of DB-API-generated exception: s   (%s) %s(	   RA   R<   R=   t	   ExceptionR)   R
   R   R   RG   (   R   R*   R+   R,   RG   t   textt   e(    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR
   6  s    (   R   R   R   t   classmethodt   FalseRK   R   R
   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR:   þ   s
   	t   InterfaceErrorc           B   s   e  Z d  Z RS(   s   Wraps a DB-API InterfaceError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRQ   G  s   t   DatabaseErrorc           B   s   e  Z d  Z RS(   s   Wraps a DB-API DatabaseError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRR   K  s   t	   DataErrorc           B   s   e  Z d  Z RS(   s   Wraps a DB-API DataError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRS   O  s   t   OperationalErrorc           B   s   e  Z d  Z RS(   s    Wraps a DB-API OperationalError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRT   S  s   t   IntegrityErrorc           B   s   e  Z d  Z RS(   s   Wraps a DB-API IntegrityError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRU   W  s   t   InternalErrorc           B   s   e  Z d  Z RS(   s   Wraps a DB-API InternalError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRV   [  s   t   ProgrammingErrorc           B   s   e  Z d  Z RS(   s    Wraps a DB-API ProgrammingError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRW   _  s   t   NotSupportedErrorc           B   s   e  Z d  Z RS(   s!   Wraps a DB-API NotSupportedError.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRX   c  s   t   SADeprecationWarningc           B   s   e  Z d  Z RS(   s*   Issued once per usage of a deprecated API.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRY   i  s   t   SAPendingDeprecationWarningc           B   s   e  Z d  Z RS(   s*   Issued once per usage of a deprecated API.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyRZ   m  s   t	   SAWarningc           B   s   e  Z d  Z RS(   s   Issued at runtime.(   R   R   R   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyR[   q  s   (,   R   R>   RL   R    R   R   R   R   R   R   R   R   R   R   R   R   R   t   KeyErrorR   R   R    R#   R&   R'   t   objectR(   R	   t   UnmappedColumnErrorR)   R:   RQ   RR   RS   RT   RU   RV   RW   RX   t   DeprecationWarningRY   t   PendingDeprecationWarningRZ   t   RuntimeWarningR[   (    (    (    sT   /var/www/send.findwatt.com/datamanager/lib/python2.7/site-packages/sqlalchemy/exc.pyt   <module>   sH    3I