<s> from ncclient import NCClientError <EOL> class TransportError ( NCClientError ) : <EOL> pass <EOL> class SessionError ( NCClientError ) : <EOL> pass <EOL> class AuthenticationError ( TransportError ) : <EOL> pass <EOL> class PermissionError ( TransportError ) : <EOL> pass <EOL> class SessionCloseError ( TransportError ) : <EOL> def __init__ ( self , in_buf , out_buf = None ) : <EOL> msg = '<STR_LIT>' <EOL> if in_buf : <EOL> msg += '<STR_LIT>' % in_buf <EOL> if out_buf : <EOL> msg += '<STR_LIT>' % out_buf <EOL> SSHError . __init__ ( self , msg ) <EOL> class SSHError ( TransportError ) : <EOL> pass <EOL> class SSHUnknownHostError ( SSHError ) : <EOL> def __init__ ( self , host , fingerprint ) : <EOL> SSHError . __init__ ( self , '<STR_LIT>' % ( fingerprint , host ) ) <EOL> self . host = host <EOL> self . fingerprint = fingerprint </s>
