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 <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user