Revision e91a5349 ncclient/transport/errors.py
b/ncclient/transport/errors.py | ||
---|---|---|
12 | 12 |
# See the License for the specific language governing permissions and |
13 | 13 |
# limitations under the License. |
14 | 14 |
|
15 |
"TODO: docstrings" |
|
16 |
|
|
15 | 17 |
from ncclient import TransportError |
16 | 18 |
|
19 |
class AuthenticationError(TransportError): |
|
20 |
pass |
|
21 |
|
|
17 | 22 |
class SessionCloseError(TransportError): |
18 | 23 |
|
19 | 24 |
def __init__(self, in_buf, out_buf=None): |
20 | 25 |
msg = 'Unexpected session close.' |
21 | 26 |
if in_buf: |
22 |
msg += ' .. IN_BUFFER: ||%s|| ' % in_buf
|
|
27 |
msg += ' IN_BUFFER: {%s}' % in_buf
|
|
23 | 28 |
if out_buf: |
24 |
msg += ' .. OUT_BUFFER: ||%s||' % out_buf
|
|
29 |
msg += ' OUT_BUFFER: {%s}' % out_buf
|
|
25 | 30 |
SSHError.__init__(self, msg) |
26 | 31 |
|
27 | 32 |
class SSHError(TransportError): |
28 | 33 |
pass |
29 | 34 |
|
30 |
class AuthenticationError(TransportError): |
|
31 |
pass |
|
32 |
|
|
33 | 35 |
class SSHUnknownHostError(SSHError): |
34 | 36 |
|
35 | 37 |
def __init__(self, hostname, key): |
Also available in: Unified diff