-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathexceptions.py
102 lines (63 loc) · 2.5 KB
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# This file is part of parallel-ssh.
#
# Copyright (C) 2014-2022 Panos Kittenis and contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""Exceptions raised by parallel-ssh classes."""
class NoIPv6AddressFoundError(Exception):
"""Raised when an IPV6 only address was requested but none are
available for a host.
This exception is raised instead of UnknownHostError
in the case where only IPV4 addresses are available via DNS for a host,
or an IPV4 address was provided but IPV6 only was requested.
"""
class UnknownHostError(Exception):
"""Raised when a host is unknown (dns failure)"""
pass
UnknownHostException = UnknownHostError
ConnectionError = ConnectionError
ConnectionErrorException = ConnectionError
class AuthenticationError(Exception):
"""Raised on authentication error (user/password/ssh key error)"""
pass
AuthenticationException = AuthenticationError
class SSHError(Exception):
"""Raised on error authenticating with SSH server"""
pass
SSHException = SSHError
class HostArgumentError(Exception):
"""Raised on errors with per-host arguments to parallel functions"""
pass
HostArgumentException = HostArgumentError
class SessionError(Exception):
"""Raised on errors establishing SSH session"""
pass
class SFTPError(Exception):
"""Raised on SFTP errors"""
pass
class SFTPIOError(SFTPError):
"""Raised on SFTP IO errors"""
pass
class ProxyError(Exception):
"""Raised on proxy errors"""
class Timeout(Exception):
"""Raised on timeout requested and reached"""
class SCPError(Exception):
"""Raised on errors copying file via SCP"""
class PKeyFileError(Exception):
"""Raised on errors finding private key file"""
class ShellError(Exception):
"""Raised on errors running command on interactive shell"""
class HostConfigError(Exception):
"""Raised on invalid host configuration"""