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 <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2019-07-07 10:00:00 +00:00
parent 57d386e82f
commit 048a31e348

View File

@@ -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)