From 04ff0058064b52ff9262a4a4820cb8b2b0b95125 Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Mon, 12 Oct 2020 12:20:53 +0000 Subject: [PATCH] Fix bug in cdrom drive status handling The bare if evaluated to true for return codes > 0 and that's wrong (CDS_DISC_OK = 4). Fixes #511. Signed-off-by: JoeLametta --- whipper/command/cd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whipper/command/cd.py b/whipper/command/cd.py index 4ac46a0..a8695de 100644 --- a/whipper/command/cd.py +++ b/whipper/command/cd.py @@ -96,7 +96,7 @@ class _CD(BaseCommand): utils.load_device(self.device) utils.unmount_device(self.device) # Exit and inform the user if there's no CD in the disk drive - if drive.get_cdrom_drive_status(self.device): # rc == 1 means no disc + if drive.get_cdrom_drive_status(self.device) == 1: # rc 1 -> no disc raise OSError("no CD detected, please insert one and retry") # first, read the normal TOC, which is fast