UNIT_DIR,
)
from cephadmlib.context import CephadmContext
+from cephadmlib.exceptions import (
+ ClusterAlreadyExists,
+ Error,
+ PortOccupiedError,
+ TimeoutExpired,
+ UnauthorizedRegistryError,
+)
FuncT = TypeVar('FuncT', bound=Callable)
red = '\033[31m'
end = '\033[0m'
-
-class Error(Exception):
- pass
-
-
-class ClusterAlreadyExists(Exception):
- pass
-
-
-class TimeoutExpired(Error):
- pass
-
-
-class UnauthorizedRegistryError(Error):
- pass
-
##################################
##################################
-class PortOccupiedError(Error):
- pass
-
-
def attempt_bind(ctx, s, address, port):
# type: (CephadmContext, socket.socket, str, int) -> None
try:
--- /dev/null
+# exceptions.py - cephadm specific exception types
+
+
+class Error(Exception):
+ pass
+
+
+class ClusterAlreadyExists(Exception):
+ pass
+
+
+class TimeoutExpired(Error):
+ pass
+
+
+class UnauthorizedRegistryError(Error):
+ pass
+
+
+class PortOccupiedError(Error):
+ pass