
    e                         d dl Z  G d de      Z G d de      Z G d de      Z G d d	e      Z G d
 de      Z G d dee      Z G d d      Z	 G d d      Z
y)    Nc                       e Zd ZdZy)KeyringErrorz$Base class for exceptions in keyringN__name__
__module____qualname____doc__     0/usr/lib/python3/dist-packages/keyring/errors.pyr   r      s    .r   r   c                       e Zd ZdZy)PasswordSetErrorz&Raised when the password can't be set.Nr   r
   r   r   r   r      s    0r   r   c                       e Zd ZdZy)PasswordDeleteErrorz*Raised when the password can't be deleted.Nr   r
   r   r   r   r      s    4r   r   c                       e Zd ZdZy)	InitErrorz0Raised when the keyring could not be initialisedNr   r
   r   r   r   r      s    :r   r   c                       e Zd ZdZy)KeyringLockedz(Raised when the keyring failed unlockingNr   r
   r   r   r   r      s    2r   r   c                       e Zd ZdZy)NoKeyringErrorz'Raised when there is no keyring backendNr   r
   r   r   r   r      s    1r   r   c                   &    e Zd ZdZefdZd Zd Zy)ExceptionRaisedContextz[
    An exception-trapping context that indicates whether an exception was
    raised.
    c                      || _         d | _        y N)ExpectedExceptionexc_info)selfr   s     r   __init__zExceptionRaisedContext.__init__"   s    !2r   c                 V    t         j                  t              | _        | j                  S r   )object__new__ExceptionInfor   r   s    r   	__enter__z ExceptionRaisedContext.__enter__&   s    }5}}r   c                      | j                   j                  |  | j                   j                  xr* t        | j                   j                  | j                        S r   )r   r   type
issubclassr   )r   r   s     r   __exit__zExceptionRaisedContext.__exit__*   sI    )}}!! 
jMM 6 6'
 	
r   N)r   r   r   r	   	Exceptionr   r$   r(   r
   r   r   r   r      s    
 *3 
r   r   c                       e Zd Zd Zd ZeZy)r"   c                 P    |st        j                         }|\  | _        | _        }y r   )sysr   r&   value)r   info_s      r   r   zExceptionInfo.__init__2   s     <<>D#' 	4:qr   c                 ,    t        | j                        S )z6
        Return True if an exception occurred
        )boolr&   r#   s    r   __bool__zExceptionInfo.__bool__7   s     DIIr   N)r   r   r   r   r2   __nonzero__r
   r   r   r"   r"   1   s    (
 Kr   r"   )r,   r)   r   r   r   r   r   RuntimeErrorr   r   r"   r
   r   r   <module>r5      sf    
/9 /1| 15, 5; ;3L 32\< 2
 
* r   