From ceece81b6d35366f6c365f3b70c3b8c4e63303ff Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 4 Aug 2025 08:35:43 +0200 Subject: [PATCH] logging fpr disc-id improved --- CDDB.py | 1 + common.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CDDB.py b/CDDB.py index 390f840..17e7786 100644 --- a/CDDB.py +++ b/CDDB.py @@ -140,4 +140,5 @@ def discid(): try: return subprocess.check_output(discid_cmd).decode("utf-8").strip().replace(" ", "+") except subprocess.CalledProcessError as e: + logger.error("disc-id command results in an exception") return None diff --git a/common.py b/common.py index 46723ac..88f1a79 100644 --- a/common.py +++ b/common.py @@ -69,4 +69,6 @@ def get_filetype(full_path): def get_disc_device(): rv = discid.get_default_device() logger.debug("Disc device is %s", repr(rv)) + if not os.path.exists(rv): + logger.warning("Disk device does not exist!") return rv