From 048a31e3483792a6ce5984af79e9afa167c5900a Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Sun, 7 Jul 2019 10:00:00 +0000 Subject: [PATCH] Fix erroneous result message for whipper drive analyze If cdparanoia fails to analyze the drive, the drive is now marked as unable to defeat the cache. Fixes #361. Signed-off-by: JoeLametta --- whipper/program/cdparanoia.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whipper/program/cdparanoia.py b/whipper/program/cdparanoia.py index 6bc579d..de2dfa3 100644 --- a/whipper/program/cdparanoia.py +++ b/whipper/program/cdparanoia.py @@ -566,6 +566,7 @@ def getCdParanoiaVersion(): _OK_RE = re.compile(r'Drive tests OK with Paranoia.') _WARNING_RE = re.compile(r'WARNING! PARANOIA MAY NOT BE') +_ABORTING_RE = re.compile(r'aborting test\.') class AnalyzeTask(ctask.PopenTask): @@ -604,7 +605,7 @@ class AnalyzeTask(ctask.PopenTask): # whether it can defeat the audio cache output = "".join(self._output) m = _WARNING_RE.search(output) - if m: + if m or _ABORTING_RE.search(output): self.defeatsCache = False if self.cwd: shutil.rmtree(self.cwd)