Related: rhbz#1060255
Class hierarchy looks like this:
StorageError
SanityException
SanityError
LUKSDeviceWithoutKeyError
... more stuff here, as needed ...
SanityWarning
... more stuff here, as needed ...
SanityException should be something generated by blivet.sanityCheck.
LUKSDeviceWithoutKeyError is currently the only distinguished subclass of
SanityError. It's special,
because in some situations where sanityCheck is called, a missing key
should not be considered fatal, but it's the caller's job to figure out if
that is the situation.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
blivet/errors.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/blivet/errors.py b/blivet/errors.py
index bc538c9..19135ef 100644
--- a/blivet/errors.py
+++ b/blivet/errors.py
@@ -192,3 +192,16 @@ class NoDisksError(StorageError):
# factories
class DeviceFactoryError(StorageError):
pass
+
+#sanity
+class SanityException(StorageError):
+ pass
+
+class SanityError(SanityException):
+ pass
+
+class SanityWarning(SanityException):
+ pass
+
+class LUKSDeviceWithoutKeyError(SanityError):
+ pass
--
1.8.3.1