o
    ÿé!^,  ã                   @   sH   d Z ddlZddlZG dd„ deƒZG dd„ deƒZG dd„ deƒZdS )	z!Exception classes used by Pexpecté    Nc                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )ÚExceptionPexpectz9Base class for all exceptions raised by this module.
    c                    s   t t| ƒ |¡ || _d S ©N)Úsuperr   Ú__init__Úvalue)Úselfr   ©Ú	__class__© ú4/usr/lib/python3/dist-packages/pexpect/exceptions.pyr   
   s   
zExceptionPexpect.__init__c                 C   s
   t | jƒS r   )Ústrr   )r   r
   r
   r   Ú__str__   s   
zExceptionPexpect.__str__c                 C   s4   t  t ¡ d ¡}dd„ |D ƒ}t  |¡}d |¡S )z¬This returns an abbreviated stack trace with lines that only concern
        the caller. In other words, the stack trace inside the Pexpect module
        is not included. é   c                 S   s(   g | ]}d |d vrd|d vr|‘qS )zpexpect/__init__r   zpexpect/expectr
   )Ú.0Úitemr
   r
   r   Ú
<listcomp>   s    

ÿz.ExceptionPexpect.get_trace.<locals>.<listcomp>Ú )Ú	tracebackÚ
extract_tbÚsysÚexc_infoÚformat_listÚjoin)r   Útblistr
   r
   r   Ú	get_trace   s   

zExceptionPexpect.get_trace)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   Ú__classcell__r
   r
   r   r   r      s
    r   c                   @   ó   e Zd ZdZdS )ÚEOFzRRaised when EOF is read from a child.
    This usually means the child has exited.N©r   r   r   r   r
   r
   r
   r   r!      ó    r!   c                   @   r    )ÚTIMEOUTz-Raised when a read time exceeds the timeout. Nr"   r
   r
   r
   r   r$   "   r#   r$   )r   r   r   Ú	Exceptionr   r!   r$   r
   r
   r
   r   Ú<module>   s    