diff --git a/zfs_backup.py b/zfs_backup.py index 5aa748d..42a2bd9 100755 --- a/zfs_backup.py +++ b/zfs_backup.py @@ -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"