B
    +‹d,  ã               @   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__© ú_/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/pexpect/exceptions.pyr   
   s    zExceptionPexpect.__init__c             C   s
   t | jƒS )N)Ú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 krd|d k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   Z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               @   s   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      s   r   c               @   s   e Zd ZdZdS )ÚTIMEOUTz-Raised when a read time exceeds the timeout. N)r   r   r   r   r   r   r   r	   r   "   s   r   )r   r   r   Ú	Exceptionr   r   r   r   r   r   r	   Ú<module>   s
   