o
    G%@i                     @   s   G d d de ZG dd de ZG dd de ZG dd de ZG dd	 d	e ZG d
d de ZG dd de ZG dd de ZG dd de Z	G dd de Z
G dd de ZG dd de ZG dd de Zg dZdS )c                           e Zd ZdZ fddZ  ZS )InvalidPasswordExceptionz@Raised when the provided password is rejected by the remote hostc                       d}t  | d S )NzInvalid password providedsuper__init__selfmessage	__class__ :/usr/lib/python3/dist-packages/sos/collector/exceptions.pyr         z!InvalidPasswordException.__init____name__
__module____qualname____doc__r   __classcell__r   r   r
   r   r          r   c                       r   )TimeoutPasswordAuthExceptionzLRaised when a timeout is hit waiting for an auth reply using a password
    c                    r   )Nz1Timeout hit while waiting for password validationr   r   r
   r   r   r      r   z%TimeoutPasswordAuthException.__init__r   r   r   r
   r   r          r   c                       r   )PasswordRequestExceptionzMRaised when the remote host requests a password that was not anticipated
    c                    r   )Nz*Host requested password, but none providedr   r   r
   r   r   r   !   r   z!PasswordRequestException.__init__r   r   r   r
   r   r      r   r   c                       r   )AuthPermissionDeniedExceptionz=Raised when authentication attempts return a permission errorc                    r   )Nz.Permission denied while trying to authenticater   r   r
   r   r   r   )   r   z&AuthPermissionDeniedException.__init__r   r   r   r
   r   r   &   r   r   c                       "   e Zd ZdZd fdd	Z  ZS )ConnectionExceptionz'Raised when an attempt to connect fails c                    s    d| d| }t  | d S )NzCould not connect to host z on specified port r   )r   addressportr	   r
   r   r   r   1   s   zConnectionException.__init__)r   r   r   r   r   r
   r   r   .       r   c                       r   )CommandTimeoutExceptionzRaised when a timeout expiresNc                    s&   d}|r|d| 7 }t  | d S )NzTimeout expiredz executing r   )r   commandr	   r
   r   r   r   :   s   z CommandTimeoutException.__init__Nr   r   r   r
   r   r    7   r   r    c                       r   )ConnectionTimeoutExceptionzARaised when a timeout expires while trying to connect to the hostc                    r   )Nz'Timeout expires while trying to connectr   r   r
   r   r   r   D   r   z#ConnectionTimeoutException.__init__r   r   r   r
   r   r#   A   r   r#   c                       r   )ControlSocketMissingExceptionz-Raised when the SSH control socket is missingr   c                    s   d| d}t  | d S )NzSSH control socket z does not existr   )r   pathr	   r
   r   r   r   L   s   z&ControlSocketMissingException.__init__)r   r   r   r   r
   r   r$   I   r   r$   c                       r   )"ControlPersistUnsupportedExceptionz5Raised when SSH ControlPersist is unsupported locallyc                    r   )Nz4ControlPersist unsupported by local SSH installationr   r   r
   r   r   r   T   r   z+ControlPersistUnsupportedException.__init__r   r   r   r
   r   r&   Q   r   r&   c                       r   )UnsupportedHostExceptionz8Raised when the host type is unsupported or undeterminedc                    r   )Nz.Host did not match any supported distributionsr   r   r
   r   r   r   \   r   z!UnsupportedHostException.__init__r   r   r   r
   r   r'   Y   r   r'   c                       r   )InvalidTransportExceptionzZRaised when a transport is requested but it does not exist or is
    not supported locallyNc                    s"   d|r|nd }t  | d S )Nz4Connection failed: unknown or unsupported transport r   r   )r   	transportr	   r
   r   r   r   e   s   
z"InvalidTransportException.__init__r"   r   r   r   r
   r   r(   a   s    r(   c                       r   )#SaltStackMasterUnsupportedExceptionz3Raised when SaltStack Master is unsupported locallyc                    r   )Nz2Master unsupported by local SaltStack installationr   r   r
   r   r   r   n   r   z,SaltStackMasterUnsupportedException.__init__r   r   r   r
   r   r*   k   r   r*   c                       r   )JujuNotInstalledExceptionz)Raised when juju is not installed locallyc                    r   )Nz=Juju is not installed, please ensure you have installed juju.r   r   r
   r   r   r   v   s   z"JujuNotInstalledException.__init__r   r   r   r
   r   r+   s   r   r+   )r   r    r   r#   r&   r$   r   r   r*   r   r'   r(   r+   N)	Exceptionr   r   r   r   r   r    r#   r$   r&   r'   r(   r*   r+   __all__r   r   r   r   <module>   s   			

