add better error message
This commit is contained in:
+2
-2
@@ -605,8 +605,7 @@ class Cryptsetup(CommandInterface):
|
||||
device = Path(line.split(":")[-1].strip())
|
||||
break
|
||||
else:
|
||||
# TODO better error message
|
||||
print("panic")
|
||||
print(Messages.CANNOT_FIND_DEVICE_PATH)
|
||||
exit(EXIT_ERROR)
|
||||
# noinspection PyUnboundLocalVariable
|
||||
return device
|
||||
@@ -830,6 +829,7 @@ class CommandRunner:
|
||||
class Messages:
|
||||
ALREADY_DECRYPTED = "Cannot decrypt, already decrypted"
|
||||
ALREADY_IMPORTED = "Cannot import, already imported"
|
||||
CANNOT_FIND_DEVICE_PATH = "Cannot find device path from output of `cryptsetup status`"
|
||||
CANNOT_FIND_BACKUP_DRIVE = "Could not find a backup drive"
|
||||
DELETE_IN_LOCAL_POOL = "ALERT! Tried to delete in local pool!"
|
||||
MAPPER_ENTRY_ALREADY_EXISTS = "mapper entry already exists"
|
||||
|
||||
Reference in New Issue
Block a user